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)
 Combining multiple rows

Author  Topic 

mem
Starting Member

28 Posts

Posted - 2004-06-03 : 18:01:08
I know this topic has been dicussed several times. Unfortunately, all the solutions I've read seem to be more complicated then I what expected. Here's my scenario...

take table a

table A
=============
1 name1
2 name2
3 name3

and produce a result like so

table temp
=============
1 name1, name2, name3

Seems simple enough, but I'm having a tough time getting a solution.

Any help would be appreciated, thanks.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-06-03 : 18:03:42
http://www.sqlteam.com/item.asp?ItemID=11021

Tara
Go to Top of Page

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2004-06-03 : 18:04:13
You just want a comma-delimited string of the values? Check out Garth's article on Coalesce

-----------------------------------------------------
Words of Wisdom from AjarnMark, owner of Infoneering
Go to Top of Page

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2004-06-03 : 18:05:30
Ha! That's funny Tara. You me but with a different article...

-----------------------------------------------------
Words of Wisdom from AjarnMark, owner of Infoneering
Go to Top of Page
   

- Advertisement -