Sequencer Parameter Looping
Posted: Mon Nov 16, 2009 4:26 am
Below is the scenario which i want to achieve by means of the Sequencer.
Sequencer calls the job that basically extracts the data from the table from certain period of time. For example, when the job is run for the first time given a parameter of start date (eg., 2005/01/01) till current date.(ie.,2009/11/16).
Today when am running the sequence,it should be
i.e,
Parameter Values :
#pStart# : '2005/01/01' ; #pEnd# : Current Date (2009/11/16)
select * from TblA where Date>=#pStart# and Date<=#pEnd#
When am running a month later (i.e. 2009/12/16), it should take the start date as the previous run's Current date and End date as the day's CurrentDate automatically.
i.e,
#pStart# : '2009/11/16'; #pEnd# : Current Date (2009/12/16)
select * from TblA where Date>=#pStart# and Date<=#pEnd#
and goes like that for subsequent runs.
Can anyone suggest a solution for this which can continue the load with just the beginning start Date.('2005/01/01' in this case)
I can do this my writing the value(CurrentDate) to sequencial file for each run and take the value from the file for the correspoding run.
Appreciate other options for achieving the same.
Thank you. :D
Sequencer calls the job that basically extracts the data from the table from certain period of time. For example, when the job is run for the first time given a parameter of start date (eg., 2005/01/01) till current date.(ie.,2009/11/16).
Today when am running the sequence,it should be
i.e,
Parameter Values :
#pStart# : '2005/01/01' ; #pEnd# : Current Date (2009/11/16)
select * from TblA where Date>=#pStart# and Date<=#pEnd#
When am running a month later (i.e. 2009/12/16), it should take the start date as the previous run's Current date and End date as the day's CurrentDate automatically.
i.e,
#pStart# : '2009/11/16'; #pEnd# : Current Date (2009/12/16)
select * from TblA where Date>=#pStart# and Date<=#pEnd#
and goes like that for subsequent runs.
Can anyone suggest a solution for this which can continue the load with just the beginning start Date.('2005/01/01' in this case)
I can do this my writing the value(CurrentDate) to sequencial file for each run and take the value from the file for the correspoding run.
Appreciate other options for achieving the same.
Thank you. :D