DECLARE @Output varchar(max) = '' SELECT @Output = coalesce(@Output+',','') + CONVERT(varchar(max),Col1) FROM Table1 SET @Output = RIGHT(@Output,LEN(@Output)-1) PRINT @Output
SELECT GROUP_CONCAT(SenderID) FROM UserInfo
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)