dbTalk Databases Forums  

Skip a step in DTS

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


Discuss Skip a step in DTS in the microsoft.public.sqlserver.dts forum.



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

Default Skip a step in DTS - 08-29-2005 , 11:29 PM






Hi,

I'm trying to create a DTS package that creates several cvs files, zip
them one by one and then email them all in one email. I have to cvs
files that is only supposed to be created once a month and I'm trying to
get the DTS to skip that step if it's not the first of the month.

I tried with ActiveX scripts that can skip a certain step but I haven't
been able to get it working. The email step always fails.

I've been trying to make my skipping part out of the example on:
http://www.sqldts.com/default.aspx?214 and the
http://www.sqldts.com/default.aspx?218 example but no luck.

Can anyone give me a few pointers on how to do this?



*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
  #2  
Old   
DR
 
Posts: n/a

Default Re: Skip a step in DTS - 09-01-2005 , 02:28 PM






You can put a script on the workflow for a transform data task. RIght
click on the transform, click workflow properties, click the options
tab, check off the Use ActiveX script, click on properties. Then use a
script like this to decide to run the transform or not. The rest of
the transforms will finish up depending on your workflow setup and
options. I got this kind of thing to work by setting a sql or active x
task as the predecessor to all the other tasks in the package.

I do my emails as a second package in a job, the email step always goes
that way.

'************************************************* *********************
' Visual Basic ActiveX Script
'************************************************* ***********************

Function Main()

if DatePart("d", Now ) = 1 then
Main = DTSStepScriptResult_ExecuteTask
msgbox "doing execution"
else
Main = DTSStepScriptResult_DontExecuteTask
msgbox "I skipped execution"
end if
End Function


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.