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 2005 Forums
 Transact-SQL (2005)
 Concatenation

Author  Topic 

Developer1983
Starting Member

3 Posts

Posted - 2007-06-29 : 11:33:37
I need to join concatenate some columns and rows into one so for example...

ID Answer
1 Blue
1 Red
2 Yellow
2 Blue
3 Green
3 Silver

So the end result would be a column that can be called "ANSWERS" so...

ID Answer
1 Blue, Red
2 Yellow, Blue
3 Green, Silver

Any help would be great..thanks

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-06-29 : 11:35:18
see http://sqljunkies.com/WebLog/amachanic/archive/2004/11/10/5065.aspx


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

Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-06-29 : 11:39:48
Also check this thread: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=53293

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

Developer1983
Starting Member

3 Posts

Posted - 2007-06-29 : 11:43:07
Thanks...i used a function...i appreciate the help
Go to Top of Page
   

- Advertisement -