dbTalk Databases Forums  

How do I choose which execute job task to run, within a DTS?

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


Discuss How do I choose which execute job task to run, within a DTS? in the microsoft.public.sqlserver.dts forum.



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

Default How do I choose which execute job task to run, within a DTS? - 08-10-2006 , 06:13 AM






I am trying to write a DTS which runs one of two different DTS scripts
depending on the data in one table in the database.

I think I am looking for an "if" or "case" type statement... is there such a
thing? Do I have to break down and write VB?

This is on Windows 2000 with SQL 2000.

Thanks a bunch!

Ben

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

Default Re: How do I choose which execute job task to run, within a DTS? - 08-10-2006 , 06:40 AM






Hello Ben,

Quote:
I am trying to write a DTS which runs one of two different DTS scripts
depending on the data in one table in the database.

I think I am looking for an "if" or "case" type statement... is there
such a thing? Do I have to break down and write VB?

This is on Windows 2000 with SQL 2000.

Thanks a bunch!

Ben

Basing on a query on your driving table you could properly set a Global Variable;then
you could use an Activex script where, testing the value of this Global Var,
you decide what to do in your ActiveX script. to perform this,unfortunately,
you should break down to VB....well... VB Script.
Bye Ben

Davide




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

Default Re: How do I choose which execute job task to run, within a DTS? - 08-11-2006 , 03:57 AM



Hello Ben,


My package for this would probably look like


ExecuteSQL task read the value from a table into a variable
On Success
Script task to test the value of the variable.
From the script task we have two On Success constraints. Depending on the
value in the variable we enable/disable the attached step.


We do this here

Looping, Importing and Archiving
(http://www.sqldts.com/default.aspx?246)

In step 4


Allan



Quote:
I am trying to write a DTS which runs one of two different DTS scripts
depending on the data in one table in the database.

I think I am looking for an "if" or "case" type statement... is there
such a thing? Do I have to break down and write VB?

This is on Windows 2000 with SQL 2000.

Thanks a bunch!

Ben




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.