all groups > sql server dts > january 2006 >
You're in the

sql server dts

group:

How to execute tasks base on a flag


How to execute tasks base on a flag Joann
1/19/2006 7:31:31 PM
sql server dts:
Hello
I need to know how to execute tasks in DTS package base on a flag.
Here is what I am trying to do:

Read the value of the flag... If it the value is true, execute task
A;otherwise, execute task B

Thanks in advance

Joann
RE: How to execute tasks base on a flag bharat jariwala
1/19/2006 9:00:02 PM
You do show using Task constan called , DTSStepScriptResult_ExecuteTask and
DTSStepScriptResult_DontExecuteTask, for example


If(DTSGlobalVariables("Temp_Last_Export_Date_Exists").Value<> 0 ) then
Main = DTSStepScriptResult_ExecuteTask
Else
Main = DTSStepScriptResult_DontExecuteTask
End if
--
Regards
Bharat Jariwala



[quoted text, click to view]
Re: How to execute tasks base on a flag Allan Mitchell
1/21/2006 3:11:07 AM
Hello Joann,


Ok So what you can do is this

1. Read the flag. How you read the flag will depend on what the flag is.
2. You then after reading the flag have two tasks on the end of workflow
from the fallg reader task.
3. Based on the flag you set the corresponding step to disabled.

Have a look at this article for an example of doing just this type of thing


http://www.sqldts.com/default.aspx?246

Allan

[quoted text, click to view]

Re: How to execute tasks base on a flag Joann
1/21/2006 10:20:37 AM
This is exactly what I was looking for. Thanks a lot for your help!

Joann
AddThis Social Bookmark Button