SELECT LEFT(Result, LEN(Result) - 1) FROM ( SELECT ( SELECT TOP 5 '{"organizationTitle":"' + [Name] + '"' ,',"orgainizationGUName":"' + [Name] + '"},'FROM [Station] FOR XML PATH('') ) AS Result ) AS t
SELECT LEFT(Result, LEN(Result) - 1) FROM ( SELECT ( SELECT TOP 5 '{"organizationTitle":"' + [Name] + '"' ,',"orgainizationGUName":"' + [Name] + '"},'FROM [Station] FOR XML PATH('') ) AS Result ) AS t
转载于:https://www.cnblogs.com/simadi/p/6737214.html