How to format TSQL SELECT output in SQL Sever

Posted by mohamadreza on Stack Overflow See other posts from Stack Overflow or by mohamadreza
Published on 2010-04-18T07:16:00Z Indexed on 2010/04/18 7:23 UTC
Read the original article Hit count: 295

Filed under:
|
|

How to loop through a select statement results to have a formatted text? for example the select is like:

select name from table 

and we want a variable @names like this:

"name1,name2,name3"

Database is SQL Server 2005

© Stack Overflow or respective owner

Related posts about tsql

Related posts about sql-server