简体   繁体   中英

SSRS, SQL - Select multiple email addresses as [CC] in Data Driven Subscription

I'm looking to CC 2 people in a Data Driven Subscription
Here's what I currently have CC'ing one person

I've provided little detail I know, let me know if you need anything else

SELECT
eUserName as UserName,  
er_EMailAddress as [TO],  
er_FullName as FullName,
CONVERT(VARCHAR(10),GETDATE(),103) + ' - Outstanding Calls for ' + er_FullName as Subject,  
'firstname.surname@domain.com' as [CC]  

FROM
xxxxxx.xxxxxxxx  

WHERE
er_status = 'Active' and eUserName in ('username1', 'username2')    

Simply make sure that the e-mail addresses are separated by ; , that is [space][semicolon][space].

So for example, if you want to send the report to test1@testmail.com and test2@testmail.com, your CC string should look like this:

test1@testmail.com ; test2@testmail.com

I've sorted it, thanks for your help
it should be:

‘john@company.biz; sue@company.biz’ AS [CC]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM