Click here to Skip to main content
15,890,690 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I have a column and having values are as:-
column
ABC
XYZ
LKO
TEMP

I want result as ABC,XYZ,LKO,TEMP.

thanks & Regards
Mohd Wasif
Posted
Comments
Kornfeld Eliyahu Peter 28-Apr-14 2:30am    
Have you done anything so far? Make some effort - code or search! As is it ain't a question...

1 solution

SQL
SELECT SUBSTRING(
(SELECT ',' + RTRIM(MyColumn) FROM myTable
FOR XML PATH('')),2,100000) AS CSV
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900