select*from dbo.np_syyp select*from ?dbo.np_yptest select*,STUFF((select ','+zb.testname from np_yptest zb? where zb.syypid=mb.syypid for XML path('')),1,1,'') AS SUMNAME ?from np_syyp mb ?