August 20, 2013 at 8:10 pm
I have a table with cols as follows
ID Unit location col1 col2 userID
1 A AA a a Lan1
1 A AA a a Lan2
1 C AA a a Lan3
2 A BB a a Lan1
i would like to have the data displayed as
1 A AA a a Lan1,Lan2
1 C AA a a Lan3
2 A BB a a Lan1
it will be a group by on ID, Unit and Location with Userid getting concatenated. Does anyone have any suggestion how to get the result displayed as above. any help will be greatly appreciated. TIA
August 20, 2013 at 8:45 pm
See these two posts:
http://davidduffett.net/post/5334646215/get-a-comma-separated-list-of-values-in-sql-with-for
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply