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 |