标签:for sp c rom ip as XML select
SELECT t.PROB_ID, STUFF(
(SELECT ‘,‘ + s.NOTES
FROM gpcomp1.GPPROBNOTES s
WHERE s.PROB_ID = t.PROB_ID
FOR XML PATH(‘‘)),1,1,‘‘) AS NOTES
FROM gpcomp1.GPPROBNOTES AS t
GROUP BY t.PROB_ID
Grouping by Multiple Columns to Single Column as A String,布布扣,bubuko.com
Grouping by Multiple Columns to Single Column as A String
标签:for sp c rom ip as XML select
原文地址:http://www.cnblogs.com/hellotech/p/3927954.html