SELECT A.Id as ERPCusId,
(
SELECT Convert(nvarchar(10),B.CWCusId)+',' FROM CW_HT_Customer AA,cw_HT_Custom B,CPE_CW_Customer C
WHERE AA.Id=B.ERPCusId and B.CWCusId=C.Id and AA.Id=A.Id for XML PATH('')
) as CWCusId
FROM CW_HT_Customer A
for xml path 应用记录
最新推荐文章于 2021-01-27 19:20:02 发布