Friday, March 9, 2012

Run DTS Package based on a Variable

I'm trying to run a DTS package based on the result of a partcular
query.
SELECT SUM(Bal_Orig_Curr) AS bal
INTO tempbal
FROM Gw078p
I want to run the rest of the package only if the value of "bal" is
equal to zero otherwise generate an email. How can create this split?
Thanks
You could store the results of the query in a global variable. After that, a
vbscript task can create the branching logic by updating the precedence
constraints.
Please see http://www.sqldts.com/214.aspx for more info. Much easier in SSIS
as the precedence constraints themselves can be based on an expression in
the GUI.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .

No comments:

Post a Comment