SQL: merging multiple row data in string
snippet in sql

SQL: merging multiple row data in string

user9419

DECLARE @Names VARCHAR(8000) 
SELECT @Names = COALESCE(@Names + ', ', '') + 
    ISNULL(Name, 'N/A')
FROM People