STUFF ile istenilen alana ait değerleri “,” ile bir araya getirme
SELECT T2.FieldSomething, STUFF(( SELECT ',' T1.Field FROM Table1 T1 WHERE T1.IDField =T2.IDField ORDER BY T1.Field FOR XML PATH('') ), 1, 1, '') AS FieldName FROM Table2 T2
Kod Kütüphanesi
SELECT T2.FieldSomething, STUFF(( SELECT ',' T1.Field FROM Table1 T1 WHERE T1.IDField =T2.IDField ORDER BY T1.Field FOR XML PATH('') ), 1, 1, '') AS FieldName FROM Table2 T2