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.
| Author |
Topic |
|
karthickbabu
Posting Yak Master
151 Posts |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
raky
Aged Yak Warrior
767 Posts |
Posted - 2009-05-14 : 02:28:14
|
| declare @temp table ( Id varchar(30), Val varchar(30))insert into @tempselect 'A1', 'AA' union allselect 'A1', 'AB' union allselect 'A1', 'AC' union allselect 'A2', 'BA' union allselect 'A2', 'BB' union allselect 'A3' ,'CA'select distinct id ,stuff( (select ''+val from @temp where id = t.id for xml path('')),1,0,'') as val from @temp t |
 |
|
|
|
|
|
|
|