SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


how to stop the package based on a condition?


how to stop the package based on a condition?

Author
Message
Sachin Vaidya
Sachin Vaidya
SSC Veteran
SSC Veteran (261 reputation)SSC Veteran (261 reputation)SSC Veteran (261 reputation)SSC Veteran (261 reputation)SSC Veteran (261 reputation)SSC Veteran (261 reputation)SSC Veteran (261 reputation)SSC Veteran (261 reputation)

Group: General Forum Members
Points: 261 Visits: 238
Hi,

Based on the value of a variabale getting set, I want to stop my SSIS package (successfully) without going to next tasks within the package. Can this be done? Please provide your inputs.

Example:
I have a stored procedure getting executed in SSIS execute SQL task. The value of output parameter of this stored procedure is getting stored in a SSIS varaible. If the value of this variable comes out as 1 then package should proceed further but if it gets set to 0, then package should stop there itself.

Regards,
Sachin
Roshan Jospeh
Roshan Jospeh
Hall of Fame
Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)

Group: General Forum Members
Points: 3203 Visits: 2093
You are probably looking for constraint expression.


Check here
http://blogs.msdn.com/b/mattm/archive/2006/10/30/using-expression-based-constraints.aspx

----------------------------------------------------------------------------------------------------------------------------------------------------
Roshan Joe

Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help
Pulivarthi Sasidhar
Pulivarthi Sasidhar
SSCrazy
SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)

Group: General Forum Members
Points: 2486 Visits: 1026
For Next Step execution based on result from SP:-

Double click on the Connection Arrow as success and constraint as follows

@SSISVariable==1

Just leave with above condition
if condition not satisfied it completes the Package & gives success results.

If the condition validated it goes to next Task .
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search