Rakesh Walia
Tuesday, September 7, 2010
getting comma separted value in sql [ using stuff function ]
---check table colum
select [name]
from employee
go
-- get csv comma seperated value ----
select stuff((select ',' + s.name from employee s order by s.name for xml path ('')),1,1,'') as csv
go
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment