Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
It's the end of the day, and I'm not that sharp anymore.I have a table with users and e-mail addresses (tblUser)1 Henri Henri@4xs.nl2 Cindy Cindy@4xs.nl3 SQLTeam info@SomeWhere.comNo I like to put all the e-mail addresses in one string so I can use it to e-mail From field. This is one example, but I have use of this functionality more often. Is there some generic script for this?Henri~~~~Anyone who can walk to the welfare office can walk to work. - Al Capone
spirit1
Cybernetic Yak Master
11752 Posts
Posted - 2005-04-04 : 10:46:43
Declare @eMailList varchar(8000)SELECT @eMailList = COALESCE(@eMailList + ', ', '') + emailFROM MyTableselect @eMailListGo with the flow & have fun! Else fight the flow
henrikop
Constraint Violating Yak Guru
280 Posts
Posted - 2005-04-04 : 10:52:20
Thx, this what I was looking for! (and in three minutes do you have a RL? )I'm happy, never saw the use of COALESCE, but now I do!Henri~~~~Anyone who can walk to the welfare office can walk to work. - Al Capone
spirit1
Cybernetic Yak Master
11752 Posts
Posted - 2005-04-04 : 10:53:20
i do have RL there's also a little thing called active topics here that helps... EDIT: see... this one was exactly a minute. Go with the flow & have fun! Else fight the flow