标签:
1 select distinct t1.pciBillID, 2 STUFF((SELECT distinct t2.Invoicenumber+ ‘,‘ 3 from TB_PCustomerInvoiceextend t2 4 where t1.pciBillID = t2.pciBillID 5 FOR XML PATH(‘‘), TYPE 6 ).value(‘.‘, ‘NVARCHAR(MAX)‘) 7 ,1,0,‘‘) data 8 from TB_PCustomerInvoiceextend t1) AS Invoicinfo
标签:
原文地址:http://www.cnblogs.com/hbsfgl/p/4876678.html