Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
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: Today @ 2:36 AM
Points: 75, Visits: 221
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


SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Wednesday, July 9, 2014 3:10 AM
Points: 615, Visits: 1,259
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: Friday, July 25, 2014 3:30 AM
Points: 1,059, Visits: 692
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