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)
 complex logic

Author  Topic 

iancuct
Yak Posting Veteran

73 Posts

Posted - 2005-04-21 : 18:23:53
I have a table like this

15 "some string" 945
15 "second string" 946
15 "hello" 947
16 "abc" 888
16 "xyz" 889

i need a query that will return

15 "some string second string hello" 945
16 "abc xyz"

If it was a number i could do a group by and SUM

how can this be done with a string?


Maybe if i had only one group it would be easier?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-04-21 : 18:50:41
You'll want to use this:

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

Instead of it being comma separated, you'll put a space there.

Tara
Go to Top of Page
   

- Advertisement -