标签:blog ar for 数据 sp div c on log
这个场景很常见,在网上查了一下,人家说用xpath 方法,亲测有效。
select stuff( (select ‘,‘+cast(u.UserName_Chn as varchar(max)) from BO_ManagementPeo b inner join V_P_UserInfo u on u.UserGUID = b.UserGUID where a.ObjectGUID=b.ObjectGUID for xml path(‘‘)) ,1,1,‘‘) as JoinUsers, ObjectGUID from BO_ManagementPeo a group by ObjectGUID
标签:blog ar for 数据 sp div c on log
原文地址:http://www.cnblogs.com/zlfucku/p/4001369.html