标签:ar sp for on as line har rom br
select [Document No_],STUFF ((select ‘ ,‘+[Item No_]+‘: ‘+Convert(varchar(20),Convert(int,[Qty_ Per Pallet]))+
‘ ‘+[Packing Unit of Measure]+‘ * ‘+Convert(varchar(20),Convert(int,[Packing Qty_ per]))+‘ ‘+[Unit of Measure Code]
from [Line] as tb01
where tb01.[Document No_]=tb02.[Document No_] for xml path(‘‘)),1,2,‘‘) as speclist
from [Line] as tb02
where tb02.[Document No_] in (‘A1‘,‘A2‘,‘A3‘)
group by [Document No_]
标签:ar sp for on as line har rom br
原文地址:http://www.cnblogs.com/z5337/p/4120455.html