A neat trick I saw to create a comma-delimited list with the results of a SQL query

declare @DelimitedList nvarchar(1000)

select @DelimitedList = coalesce(@DelimitedList + ‘, ‘, ”) + [table].[column] from  [table]

select @DelimitedList