SQL查询结果行转字符串,并以逗号分割

SELECT STUFF((SELECT ','+x_SourceType FROM x_fy_ContractSource WHERE x_fy_ContractSource.x_ContractGUID='20f5a958-a79a-4d90-fe8d-08d948d27530' for xml path('')),1,1,'') 

posted @ 2022-07-19 16:02  枫叶轻翔  阅读(380)  评论(0编辑  收藏  举报