27,579
社区成员
发帖
与我相关
我的任务
分享
select containerid, xianghao= replace( (stuff((select ','+[xianghao] from vwcontainer t where containerid=vwcontainer.containerid for xml path('')), 1, 1, '')),' ','')
from vwcontainer
where parting='900210214-5-1'
group by containerid
select * from vwcontainer where parting='900210214-5-1' order by containerid asc
select containerid, [value] = stuff((select ',' + xianghao from vwcontainer t where containerid = vwcontainer.containerid and parting='900210214-5-2' for xml path('')) , 1 , 1 , '')
from vwcontainer
where containerid is not null
group by containerid