--SELECT ff= stuff((select ','+cast(WorkOrderNo as varchar)
-- FROM dbo.TB_WorkOrder c
-- where tpl.ProjectID=c.ProjectID
-- WHERE c.WorkOrderType=1
-- for xml path('')),1,1,'')
2024-03-07 22:01:21
--SELECT ff= stuff((select ','+cast(WorkOrderNo as varchar)
-- FROM dbo.TB_WorkOrder c
-- where tpl.ProjectID=c.ProjectID
-- WHERE c.WorkOrderType=1
-- for xml path('')),1,1,'')
下一篇:SQL 多行合并一行