Ver originalSELECT T.*, Stuff((SELECT ',' +Member FROM tabla_logfile T1 WHERE T1.GROUP#=T.GROUP# FOR XML Path('')),1,1,'') AS MiTablaFROM (SELECT DISTINCT GROUP# FROM tabla_logfile) T;