![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a transform data task that is pulling records from a table for prepping before inserting into another. Is there a way to stop the DTS package at that point if the transform data task does not pull any records from it's select statement. All assistance is appreciated |
#3
| |||
| |||
|
|
-----Original Message----- If you are using SQL Server 2000 you can do this Assign the results of SELECT COUNT(*) FROM....................YOUR CRITERIA in an ExecuteSQL task to a Global variable. In an Active Script task after it you can query the value of the Global Variable if Cint(DTSGlobalVariables("MyVal").Value) = 0 then ... .. And you can then use workflow to decide which way to go Multiple Paths in Workflow http://www.sqldts.com/default.aspx?6,103,218,7,1 -- Allan Mitchell (Microsoft SQL Server MVP) MCSE,MCDBA www.SQLDTS.com I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Toby" <trogers (AT) spammeanddie (DOT) brainstormus.com> wrote in message news:0a8501c346a3$3ee11da0$a101280a (AT) phx (DOT) gbl... I have a transform data task that is pulling records from a table for prepping before inserting into another. Is there a way to stop the DTS package at that point if the transform data task does not pull any records from it's select statement. All assistance is appreciated . |
#4
| |||
| |||
|
|
-----Original Message----- If you are using SQL Server 2000 you can do this Assign the results of SELECT COUNT(*) FROM....................YOUR CRITERIA in an ExecuteSQL task to a Global variable. In an Active Script task after it you can query the value of the Global Variable if Cint(DTSGlobalVariables("MyVal").Value) = 0 then ... .. And you can then use workflow to decide which way to go Multiple Paths in Workflow http://www.sqldts.com/default.aspx?6,103,218,7,1 -- Allan Mitchell (Microsoft SQL Server MVP) MCSE,MCDBA www.SQLDTS.com I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Toby" <trogers (AT) spammeanddie (DOT) brainstormus.com> wrote in message news:0a8501c346a3$3ee11da0$a101280a (AT) phx (DOT) gbl... I have a transform data task that is pulling records from a table for prepping before inserting into another. Is there a way to stop the DTS package at that point if the transform data task does not pull any records from it's select statement. All assistance is appreciated . |
![]() |
| Thread Tools | |
| Display Modes | |
| |