DECLARE @cus TABLE (col1 int, col2 varchar(50));
INSERT INTO @cus
SELECT 1, 'John' UNION ALL
SELECT 2, 'Bob';
SELECT stuff((SELECT ',' + convert(varchar(10), col1) + ',' + col2
FROM @cus
ORDER BY col1
FOR XML PATH(''),TYPE).value('.','varchar(max)'),1,1,'')