dbTalk Databases Forums  

Stopping DTS Package

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Stopping DTS Package in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Toby
 
Posts: n/a

Default Stopping DTS Package - 07-10-2003 , 12:22 AM






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


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Stopping DTS Package - 07-10-2003 , 01:37 AM






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

Quote:
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




Reply With Quote
  #3  
Old   
Toby
 
Posts: n/a

Default Re: Stopping DTS Package - 07-10-2003 , 03:31 AM



Thanks for pointing me in the right, Alan

Toby


Quote:
-----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



.


Reply With Quote
  #4  
Old   
Toby
 
Posts: n/a

Default Re: Stopping DTS Package - 07-16-2003 , 11:20 PM



Thanks Allan

Quote:
-----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



.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.