Re: Pass variables from parent DTS to child DTS package...
From: Darren Green (darren.green_at_reply-to-newsgroup-sqldts.com)
Date: 04/19/04
- Next message: Darren Green: "Re: DTSRun and Batch file"
- Previous message: Darren Green: "Re: New DTSrun on SQL Server 7"
- Maybe in reply to: gr8patra: "Pass variables from parent DTS to child DTS package..."
- Next in thread: Andreas Terzis: "Re: Pass variables from parent DTS to child DTS package..."
- Reply: Andreas Terzis: "Re: Pass variables from parent DTS to child DTS package..."
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 19 Apr 2004 22:41:48 +0100
In message <OJyBTQEJEHA.3104@TK2MSFTNGP10.phx.gbl>, Andreas Terzis
<gr8patra@pacbell.net> writes
>Darren,
>Thanks for the response. The child package is executed by itself
>sometimes by a job and runs let's say for the last month. Sometimes
>though, I need to have a job run which calls the parent package, which
>in turn calls the child package. The child package has all the logic
>for my report and the parent package only changes the OriginalDate and
>then executes the child package in a loop. Let's say that the child
>package uses an OriginalDate of '01-31-04' (and a TargetDate of
>'02-29-04'). When it is executed by itself (not called by the parent
>package), it gets data between those two dates. But I need to have the
>child package generate 13 reports sometimes, for trending purposes. The
>TargetDate always remains the same but the OriginalDate should be
>'01-31-03' in the first execution, '02-28-03' in the second and so on,
>up to '01-31-04'. That's why I need those OriginalDate instances change
>every time in the parent package. I guess I can eliminate the parent
>package text input file, but I am not sure if the user would want the
>historical data generated for 13 months or 25 or 6. Does that make
>sense? I am glad you got your example to work. I still cannot get mine
>to work. Is there any way you could e-mail me the two packages (if they
>still work after my latest explanation)? Basically, the OriginalDate in
>the child package should change each time the package is called by the
>parent package. That should be printed every time by the "msgbox"
>command (msgbox "ChildDTS - ..."). I would appreciate your help.
>Thanks,
>Andreas
>
Andreas,
If the child package is normally executed by itself from the job, what
sets the OriginalDate for that run? Is there some logic in the child
overwriting the variables supplied by the parent?
(I'll send the packages tomorrow as I'm on another machine now)
-- Darren Green (SQL Server MVP) DTS - http://www.sqldts.com PASS - the definitive, global community for SQL Server professionals http://www.sqlpass.org
- Next message: Darren Green: "Re: DTSRun and Batch file"
- Previous message: Darren Green: "Re: New DTSrun on SQL Server 7"
- Maybe in reply to: gr8patra: "Pass variables from parent DTS to child DTS package..."
- Next in thread: Andreas Terzis: "Re: Pass variables from parent DTS to child DTS package..."
- Reply: Andreas Terzis: "Re: Pass variables from parent DTS to child DTS package..."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|