Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

how to stop the package based on a condition? Expand / Collapse
Author
Message
Posted Monday, March 4, 2013 2:38 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Friday, January 8, 2016 3:17 AM
Points: 75, Visits: 234
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
Post #1426138
Posted Monday, March 4, 2013 2:46 AM


Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Thursday, January 14, 2016 2:11 AM
Points: 679, Visits: 1,400
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
Custom cleanup script for backups
Post #1426140
Posted Monday, March 4, 2013 2:59 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 11:52 PM
Points: 1,258, Visits: 862
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 .

Post #1426149
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse