Shankar Chavan
Friday, 27 December 2013
SQL-Convert all rows of a column into comma separated values
SELECT STUFF((SELECT ',' + name
FROM Sys.columns where object_id=OBJECT_ID('tblName')
FOR XML PATH('')) ,1,1,'') AS Txt
No comments:
Post a Comment
Newer Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment