SqlServer 将多条数据的某列按“,”号拼接 查询出来
SELECT (select stuff((SELECT ','+ Phone from dbo.ReservationDetails WHERE ReservationDetailId IN ( SELECT Item FROM dbo.fnSplit(@ReservationDetailId, ',') ) for xml path('')),1,1,'')) AS Mobiles
SELECT (select stuff((SELECT ','+ Phone from dbo.ReservationDetails WHERE ReservationDetailId IN ( SELECT Item FROM dbo.fnSplit(@ReservationDetailId, ',') ) for xml path('')),1,1,'')) AS Mobiles