August 5, 2009 at 8:38 am
Hi,
I am using an 'Execute SQL Task' Step to return a COUNT as the result. Now if this Count value = 3 I want to direct the output to another 'Execute SQL Task' or else send an error message. I have designed the 1st 'Execute SQL Task' to get the Count and I also store it in a variable 'User::Count' in the Resultset. But I am lost as to where do I check if this value is 3 or not. Once I can do that check I can redirect it to the next step. The flow would look something like the following:
If Count <> 3
Execute SQL Step 1 ----------------> Send Error Mail and Exit
|
| If Count = 3
V
Execute SQL Step 2
Can somebody please help?
Thanks,
SJ
August 5, 2009 at 9:24 am
You can have 2 precedent constraints and have them check the value of the Count variable. On the precedence constraints (green arrows for success) you'd change the options to:
For the "failure" option:
Evaluation Operation: Expression and Constraint
Value: Success
Expression: @Count 3
Multiple Constraints: Logical And
For the "success" option:
Evaluation Operation: Expression and Constraint
Value: Success
Expression: @Count = 3
Multiple Constraints: Logical And
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
August 6, 2009 at 7:28 am
Thanks Jack! That worked.
~SJ
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply