Mahmoud ElMansy: knowledge meant to be free

Select ‘Concatenate’ many rows into a single text string SQL

This code can easily group rows into single line
separated by character.

DECLARE @OneText VARCHAR(8000);
SELECT @OneText= COALESCE(@OneText+ ', ', '') + ColumnName FROM MyTable;