dbTalk Databases Forums  

DTS Package designer add success criteria

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


Discuss DTS Package designer add success criteria in the microsoft.public.sqlserver.dts forum.



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

Default DTS Package designer add success criteria - 04-26-2006 , 08:05 PM






DTS Package designer add success criteria

I'm using the DTS Package designer to export data to a text file.
But I only want to export/create a file, if there is data to export. ie
if (select count(*) from xxx ) > 0 do export.

How can I do this?


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

Default Re: DTS Package designer add success criteria - 04-26-2006 , 08:23 PM






Hello paulhux174 (AT) hotmail (DOT) com,


You do this

In an ExecuteSQL task you count the rows in the table
You assign this to a variable using the Parameters button
On Success you move to a script task which tests the value of the variable

If the value > X you enable a path to the datapump task
If not then you disable that path.

You can find examples on our site of doing these things

www.SQLDTS.com


Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

Quote:
DTS Package designer add success criteria

I'm using the DTS Package designer to export data to a text file.
But I only want to export/create a file, if there is data to export.
ie
if (select count(*) from xxx ) > 0 do export.
How can I do this?




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.