We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
with the following results:
declare @t table(id int, name varchar(90),somecolumn varchar(90)) insert into @t select 1,'ABC','X' union all select 1,'ABC','Y' union all select 1,'ABC','Z' union all select 2,'MNO','R' union all select 2,'MNO','S' select ID,Name, stuff((select ',' + CAST(t2.SomeColumn as varchar(1000)) from @t t2 where t1.id = t2.id and t1.name = t2.name for xml path('')),1,1,'') SomeColumn from @t t1 group by id,Name
ID Name SomeColumn
1 ABC X,Y,Z
2 MNO R,S
Add your voice to the tech community where 5M+ people just like you are talking about what matters.