SELECT STUFF(
(SELECT
Distinct '|'+ProductCode
FROM [chexian].[dbo].[ProxyServer]
WHERE CompanyID=1069 FOR XML PATH('')
),1,1,'')
SELECT STUFF(
(SELECT
Distinct '|'+ProductCode
FROM [chexian].[dbo].[ProxyServer]
WHERE CompanyID=1069 FOR XML PATH('')
),1,1,'')
转载于:https://www.cnblogs.com/XuPengLB/p/5773294.html