rows to comma separated values in mssql

Solutions on MaxInterview for rows to comma separated values in mssql by the best coders in the world

showing results for - "rows to comma separated values in mssql"
Francisco
05 Jul 2018
1DECLARE @test NVARCHAR(max)  
2SELECT @test = COALESCE(@test + ',', '') + field2 FROM #test
3SELECT field2 = @test