dbTalk Databases Forums  

Exiting a DTS Package if no rows exist in a given table.

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


Discuss Exiting a DTS Package if no rows exist in a given table. in the microsoft.public.sqlserver.dts forum.



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

Default Exiting a DTS Package if no rows exist in a given table. - 08-22-2003 , 06:00 AM






Does anyone know how you can exit a DTS package if no rows
exist within a given table?

Thanks

David.

Reply With Quote
  #2  
Old   
David Selwood
 
Posts: n/a

Default Re: Exiting a DTS Package if no rows exist in a given table. - 08-22-2003 , 06:39 AM






Thanks for help Allan.

Cheers

David.
Quote:
-----Original Message-----
Yes

You can

1. Use ADO in an ActiveScript task to find out how many
rows are in the
table and based on this determine whether to proceed.

Multiple Paths in Workflow
http://www.sqldts.com/default.aspx?6,103,218,7,1


2. Use an ExecuteSQL task to do SELECT COUNT(*) and
assign value to a
global variable. You then test the value of the global
variable and take
action as 1.

3. If you want to test the recordcount before you
DataPump the table then
simply carry on with the datapump and test in an ActiveS
Script task the
RowsComplete property of the datapump in an Active Script
task.



--


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
.


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.