DECLARE @stringCommaSeperated VARCHAR(1000)
--Make comma seperated values from a column
SET @stringCommaSeperated = SUBSTRING((SELECT ', ' + s.ColumnName FROM Table_Name s FOR XML PATH('')),2,200000)
SELECT @stringCommaSeperated
--Make comma seperated values from a column
SET @stringCommaSeperated = SUBSTRING((SELECT ', ' + s.ColumnName FROM Table_Name s FOR XML PATH('')),2,200000)
SELECT @stringCommaSeperated