Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 IF...THEN in DTS

Author  Topic 

TexDec
Starting Member

22 Posts

Posted - 2002-06-24 : 15:41:56
IS there a way to setup an IF THEN loop in a DTS package. I need to execute a sub package multiple times, once for every quarter.

Something like this.

SET initial quarter
For x = inital qtr = final qtr (current[x],initial and final qtr are all stored in a table)
Execute "sub DTS package" for qtr x
next x

Note: I need this to happen in a DTS window and not in VB/ActiveX/Any programing language.

Declan K


The only Keane we need is Robbie

setbasedisthetruepath
Used SQL Salesman

992 Posts

Posted - 2002-06-24 : 15:51:41
Well, DTS does provide an ActiveX scripting task which allows you to run VBScript in a DTS package ...

That would be the mechanism for implementing your pseudo-code above, incidentally. Use VBScript to manipulate the DTS object model to dynamically create an execute package task and execute it.

Jonathan Boott, MCDBA
Go to Top of Page

TexDec
Starting Member

22 Posts

Posted - 2002-07-01 : 18:02:30
I know that it can be done using an activeX component, but I have been specifically told to not use VB, it has to be done using DTS components, (don't ask why....) :-(



Declan K


The only Keane we need is Robbie
Go to Top of Page

byrmol
Shed Building SQL Farmer

1591 Posts

Posted - 2002-07-01 : 18:09:27
Declan,

Given that you are only allowed to use DTS objects.
The following must be true:

You are allowed to use any objects types that is native to a DTS package.

So given the above, there IS a DTS object called ActiveX Script! It does not run VB only VBScript or JavaScript!

Tell who ever it is to take a class in logic.....

DavidM

"SQL-3 is an abomination.."
Go to Top of Page
   

- Advertisement -