March 9, 2017 at 4:07 pm
How to write the if condition in the sript task in SSIS package
the logic is if table name is not 'EMP' then continue running the packge
if table name is EMP then don't end the package should continue.
if (Dts.Variables["User::var"].Value.ToString() == "EMP")
{
????
March 9, 2017 at 5:58 pm
mcfarlandparkway - Thursday, March 9, 2017 4:07 PMHow to write the if condition in the sript task in SSIS packagethe logic is if table name is not 'EMP' then continue running the packge
if table name is EMP then don't end the package should continue.if (Dts.Variables["User::var"].Value.ToString() == "EMP")
{
????
So if either condition is true, you want to continue running the package? What is the point of this?
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
March 10, 2017 at 8:39 am
I believe that you're looking for functionality given by precedence constraints. These are the arrows that define the order of the tasks (you can double click on them).
March 10, 2017 at 9:34 am
Is there any reason why you would need a Script package to do this? You could change your evaluation operation to the next task in your Control Flow to Expression and Constraint. Then set the Value to Success (assuming that you are continuing in a Success), and then put an expression of something like:@[$User:var] == "EMP" ? TRUE : FALSE
Also set your logical operator to what you require (Probably AND).
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply