SELECT rp.SupplierID,s.SupplierName,
STUFF((SELECT distinct ',' + sp.Name FROM RecordForPushBaseInfo st with(nolock) inner join SupplierPlatform sp with(nolock) on st.SupplierPlatformID=sp.Id where st.SupplierID=rp.SupplierID FOR XML PATH('')),1, 1, '') AS allTitle FROM RecordForPushBaseInfo rp with(nolock) inner join supplier s with(nolock) on rp.SupplierID=s.SupplierID where PushState<>1 and rp.InsertTime between '2014-07-25' and '2014-07-26' and rp.SupplierID in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) GROUP BY rp.SupplierID,s.SupplierName; |
|