select distinct product,stuff((select ',' + part_no from TblNm t where t.product=a.product FOR XML PATH('')),1,1,'') as a from TblNm as a
SELECT t1.[product], STUFF( (SELECT ', ' + [part_no] AS 'text()' FROM YourTable AS t2 WHERE t2.product = t1.product FOR XML PATH('')), 1, 1, '') AS [Keywords] FROM YourTable AS t1 GROUP BY t1.[product]
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)