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 2008 Forums
 Transact-SQL (2008)
 select statement getting values comma seperated

Author  Topic 

cplusplus
Aged Yak Warrior

567 Posts

Posted - 2011-03-10 : 15:54:52
Is it possible to get all emailid's with a comma seperator, instead of multiple rows.

select emailid from tab_users where u_type='SUP'

Thank you very much for the helpful info.

robvolk
Most Valuable Yak

15732 Posts

Posted - 2011-03-10 : 16:13:08
SELECT emailid + ',' rom tab_users where u_type='SUP' FOR XML PATH('')
Go to Top of Page

cplusplus
Aged Yak Warrior

567 Posts

Posted - 2011-03-10 : 16:24:12
Thanks a LOT.
Go to Top of Page
   

- Advertisement -