Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Subquery Problem

Author  Topic 

wotrac
Yak Posting Veteran

98 Posts

Posted - 2005-12-01 : 17:09:18
I have a table (del_info) containing the following values

del_no line_no text
123 0 The Cow
123 1 Jumped Over
123 2 The Moon
124 0 The Rain
124 1 In Spain
124 2 etc

I want to be able to concatenate the text fields against a umique line number. eg

123 The Cow Jumped Over The Moon
124 The Rain In Spain etc

Can anyone help me understand the correct way to go about this, as I am unsure as to the correct way to proceed.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-12-01 : 17:20:40
Here is an article that discusses it:

http://www.sqlteam.com/item.asp?ItemID=11021

The delimiter in the article is a comma, but you can make it a space if you'd like.

Tara Kizer
aka tduggan
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-12-02 : 01:15:18
Also
http://sqljunkies.com/WebLog/amachanic/archive/2004/11/10/5065.aspx?Pending=true

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -