SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Concatenate grouped row fields
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

SoftFox
Starting Member

42 Posts

Posted - 11/08/2007 :  07:41:38  Show Profile  Click to see SoftFox's MSN Messenger address  Reply with Quote
If i have a table like the following:

ID SomeText
---------------
1 monkey
1 fish
2 badger
2 beaver
2 rat

and i want to display it as the following:

ID AllTextValues
------------------------
1 monkey fish
2 badger beaver rat

Is there a way of doing this without resorting to a cursor?

khtan
In (Som, Ni, Yak)

Singapore
17431 Posts

Posted - 11/08/2007 :  07:48:20  Show Profile  Reply with Quote
http://sqlblog.com/blogs/adam_machanic/archive/2006/07/12/rowset-string-concatenation-which-method-is-best.aspx


KH
Time is always against us

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000