How to select comma separated list in Sqlserver
2039
25-Dec-2015
I want to select comma separated list in Sql Server please help me.
Updated on 25-Dec-2015
Anonymous User
25-Dec-2015When we want to generate a comma separated list of columns values like a list of EmailIDs to send mail. In SQL Server, we can make a comma separated list by using COALESCE as shown in below.
Use of COALESCE to create comma separated list
Suppose we have following data in Employee table and we need to make a semicolon separated list of EmailIDs to send mail, then we can use COALESCE as shown in below.