November 23, 2012 at 12:15 am
Hi,
I am having employee table where emailID as one of column.I want to fetch email id's from this column on particular condition.For example employee which are absent and does not applied for leave.Now i want to fetch such employees and send a mail to those employees.I know we can do this by send mail task but problem is that how to fetch only related mail id's.
I have write a query where i am able to get this employees with email id but challenge facing is that how to send mail to all this?
Thanks
Abhas.
November 23, 2012 at 1:21 am
You can store the resultset of the query in an object variable in the Execute SQL Task.
Loop over this variable using the For Each Loop. In each iteration of the loop, write the mailID to a string variable (in the Variable Mappings pane).
Put a Send Mail Task inside the For Each Loop and use the string variable to configure this task to send an email to the employee.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply