In this article i will show you how you can convert table column value into comma separated string. So for this first we will create a new table named as employee.
Now add some record in to the table.
Now here is the query
Declare @empname varchar(max)
Set @empname=null
SELECT @empname= COALESCE(@empname + ';', '') + Emp_Name from Employee
select @empname;
0 comments:
Please let me know your view