Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Query to return all rows to one row

Author  Topic 

joemama
Posting Yak Master

113 Posts

Posted - 2011-01-02 : 15:30:56
i have a query that collects email address in rows

SELECT useremail
FROM dbo.WQryNewsletter

like this

xxx@gmail.com
yyy@gmail.com
zzz@gmail.com

but i want it to return it like this

xxx@gmail.com,yyy@gmail.com,zzz@gmail.com

can someone tell me how to do it?

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2011-01-02 : 16:20:21
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=81254


N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page
   

- Advertisement -