dbTalk Databases Forums  

How to execute tasks base on a flag

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


Discuss How to execute tasks base on a flag in the microsoft.public.sqlserver.dts forum.



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

Default How to execute tasks base on a flag - 01-19-2006 , 09:31 PM






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


Reply With Quote
  #2  
Old   
bharat jariwala
 
Posts: n/a

Default RE: How to execute tasks base on a flag - 01-19-2006 , 11:00 PM






You do show using Task constan called , DTSStepScriptResult_ExecuteTask and
DTSStepScriptResult_DontExecuteTask, for example


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



"Joann" wrote:

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



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

Default Re: How to execute tasks base on a flag - 01-21-2006 , 05:11 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

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




Reply With Quote
  #4  
Old   
Joann
 
Posts: n/a

Default Re: How to execute tasks base on a flag - 01-21-2006 , 12:20 PM



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

Joann


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.