You are here:Home » tsql » Get Comma seperated list of values

Get Comma seperated list of values

DECLARE @listStr VARCHAR(MAX)
SELECT @listStr = COALESCE(@listStr+',' ,'') + repldata FROM repldata
SELECT @listStr
GO