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)
 concat multiple row values into 1 value.

Author  Topic 

cjonline
Yak Posting Veteran

55 Posts

Posted - 2009-12-16 : 10:50:10
hi,
I have a table

ie.

code, text
-----------
1, hello
2, this
3, is
4, cool

How can I get an output of the following:

code, text
----------
1, hello this is cool

thanks
Craig.

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-12-16 : 11:17:39
see
Rowset string concatenation: Which method is best ?







KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

cjonline
Yak Posting Veteran

55 Posts

Posted - 2009-12-16 : 11:26:36
this is too confusing.. I've read this a few times.. I dont want to have to use a function.. I have an existing sql statement with a jew sub queries and need to add a concated field.
Go to Top of Page

RyanRandall
Master Smack Fu Yak Hacker

1074 Posts

Posted - 2009-12-16 : 11:43:06
More options here: http://www.projectdmx.com/tsql/rowconcatenate.aspx


Ryan Randall - Yak of all trades
Solutions are easy. Understanding the problem, now, that's the hard part.
Go to Top of Page
   

- Advertisement -