Home > Archive > MS SQL Server DTS > January 2006 > How to execute tasks base on a flag









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to execute tasks base on a flag
Joann

2006-01-20, 3:23 am

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

bharat jariwala

2006-01-20, 3:23 am

You do show using Task constan called , DTSStepScriptResult_
ExecuteTask and
DTSStepScriptResult_
DontExecuteTask, for example


If(DTSGlobalVariable
s(" Temp_Last_Export_Dat
e_Exists").Value<> 0 ) then
Main = DTSStepScriptResult_
ExecuteTask
Else
Main = DTSStepScriptResult_
DontExecuteTask
End if
--
Regards
Bharat Jariwala



"Joann" wrote:

> 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
>
>

Allan Mitchell

2006-01-21, 7:23 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

> 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
>



Joann

2006-01-21, 1:23 pm

This is exactly what I was looking for. Thanks a lot for your help!

Joann

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com