September 14, 2011 at 10:26 pm
Hi everyone, would like to ask a question.
In my SSIS, i am required to check a DB column 'Batch_ID' for the current date. If it is the current date, i will have to do a data dump. However if it is not the current date i am required to send an email notification. Can anyone teach me how to do it? Step by step teaching will be appreciated alot. Thanks
Currently i have done the data dump using the data flow task. but i do not know how to do the 'checking of batch_id' and also email notification.
i understand that i should use conditional split to do so. i have done the conditional split with these codes:
correctdate BATCH_ID == GETDATE()
incorrectdate BATCH_ID != GETDATE()
i do not know whether is it correct. can anyone tell me whether is it correct?
If the codes are correct then how do i proceed with the next step?
do i have to link the conditional split to anything? cause i do not know what to link to next.
-----------
would like to ask another question. is it possible to use a script task to do it?
like having a if..else statement?
September 15, 2011 at 3:25 am
angelz_arch (9/14/2011)
Hi everyone, would like to ask a question.In my SSIS, i am required to check a DB column 'Batch_ID' for the current date. If it is the current date, i will have to do a data dump. However if it is not the current date i am required to send an email notification. Can anyone teach me how to do it? Step by step teaching will be appreciated alot. Thanks
Currently i have done the data dump using the data flow task. but i do not know how to do the 'checking of batch_id' and also email notification.
i understand that i should use conditional split to do so. i have done the conditional split with these codes:
correctdate BATCH_ID == GETDATE()
incorrectdate BATCH_ID != GETDATE()
i do not know whether is it correct. can anyone tell me whether is it correct?
If the codes are correct then how do i proceed with the next step?
do i have to link the conditional split to anything? cause i do not know what to link to next.
-----------
would like to ask another question. is it possible to use a script task to do it?
like having a if..else statement?
You are trying to achieve something in a dataflow task which should be done at the control-flow level.
Here's how it might work:
- Use an Execute SQL task to get the Batch ID and assign it to a package variable (which you'll have to set up first).
- Use a script task to compare the Batch ID with the value in the variable and set a new Boolean package variable 'Email' to true (e-mail required) or false (data extract required).
- From the script task there will be two possible paths, one to a dataflow (for the extract) and one to an e-mail task. Use precedence constraints on these to control which path gets followed, depending on the value of your 'email' variable.
September 15, 2011 at 8:43 am
You could probably forego the script task by having two outputs from the Execute SQL Task, and assigning the paths to an Expression evaluation.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy