September 22, 2011 at 9:00 am
Hello Everyone
Hope that everyone is having a wonderful programming day.
I am creating a 2008 SSIS package, and would like to try something. I am populating a variable with a count(*) from a table. If this count is 0, then I want to execute a sql task to write to a history table, but if the count is greater than 0, then I want to process other SQL code, using another SQL task.
My question is, what is the best way to perform this comparison, and execute other steps in the package, or simply execute a SQL task to write to a history table?
Thank you in advance
Andrew SQLDBA
September 22, 2011 at 10:27 am
Actually I think this is pretty simple..
Following the EXEC SQL task you have two success paths, one goes to the additional processing, the other goes to whatever process you will use to write the history.
Ok, here is a quick sample:
and here are the constraints:
And you only have to touch one of the bottom two constraints to make them OR:
Answer your question or raise more?
CEWII
September 22, 2011 at 5:30 pm
Thank you Elliot
That works perfectly
Andrew SQLDBA
September 23, 2011 at 7:58 am
Great, thanks..
CEWII
September 23, 2011 at 9:33 am
Oops
So sorry about misspelling your name Elliott
Thank You again
Andrew SQLDBA
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply