SELECT t.col1,
STUFF((SELECT ',' + col2 FROM table WHERE col1 = t.col1 FOR XML PATH('')),1,1,'')
FROM (SELECT DISTINCT col1 FROM table) t
------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/