Group_Concat@MSSQL

select
A.GroupSeq,
replace(( select name as [data()]
from Table
where A.GroupSeq=GroupSeq
for xml path(”)),’ ‘,’,’) as Member
from [Table] as A
group by GroupSeq

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です