October 28, 2010 at 3:57 am
How to build a string concatenating values from multiple rows.
Example:
RowId Name
----- --------
1 Articles
2 Forums
3 Scripts
4 Surveys
Requested output:
Articles, Forums, Scripts, Surveys
There's a good article at Simple Talk[/url], haven't found one here on SSC.
I see this asked over and over on the forums.
-- Gianluca Sartori
October 28, 2010 at 6:44 am
I'll take this one.
October 28, 2010 at 8:25 am
Excellent, no hurry, Lynn
June 23, 2011 at 5:32 pm
I believe that Wayne S. did this one already.
--Jeff Moden
Change is inevitable... Change for the better is not.
June 23, 2011 at 5:35 pm
I always point folks to this one:
http://www.sqlservercentral.com/articles/FOR+XML+PATH/70203/
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
June 24, 2011 at 12:53 am
Craig Farrell (6/23/2011)
I always point folks to this one:http://www.sqlservercentral.com/articles/FOR+XML+PATH/70203/
Ah! I didn't notice it. My bad. :blush:
Thanks for the pointer.
-- Gianluca Sartori
June 24, 2011 at 6:21 am
Craig Farrell (6/23/2011)
I always point folks to this one:http://www.sqlservercentral.com/articles/FOR+XML+PATH/70203/
For delimited lists, I point folks to this one:
http://www.sqlservercentral.com/articles/comma+separated+list/71700/
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply