Hi All,
I have a simple DTS Package which executes a stored procedure and exports the result to an Excel file.
In the stored procedure I use two dates like:
Select * from Table1 where
ScanDate betweeen @StartDate and @EndDate.
Now I want to schedule the DTS Package so that it runs once every month, and in the stored procedure the start and end dates should be the first and last date of the month that the package is being run. (Example if it is scheduled to run on the last day of every month, let's say july 2004, it should take July 1st 2004 as start date and July 31st 2004 as end date for the stored procedure).
Now my question is how can I do this, in the DTS package by passing parameters somehow or should I set these dates inside the stored procedure. Or any other alternative solution. Which is the best approach to do this.
Thank you,
Shal
I have a simple DTS Package which executes a stored procedure and exports the result to an Excel file.
In the stored procedure I use two dates like:
Select * from Table1 where
ScanDate betweeen @StartDate and @EndDate.
Now I want to schedule the DTS Package so that it runs once every month, and in the stored procedure the start and end dates should be the first and last date of the month that the package is being run. (Example if it is scheduled to run on the last day of every month, let's say july 2004, it should take July 1st 2004 as start date and July 31st 2004 as end date for the stored procedure).
Now my question is how can I do this, in the DTS package by passing parameters somehow or should I set these dates inside the stored procedure. Or any other alternative solution. Which is the best approach to do this.
Thank you,
Shal