I have a three reports which are currently being called by a batch job. These reports are scheduled to run on a given day each quarter. The individual who receives this information just made a request to be able to run these reports for historical time periods while maintaining the same automated schedule. I have taken care of the coding change I just need a way to feed it the dates the user wants to see the report ran for.
So, what I need to know if there is a way to pass dates to a batch job and then use those dates to pass to the files called by oSQL?
What do you mean by a batch job? If it's a .bat file then you can write the file using sql or use command line parameters and including the dates. If an agent job then you can get the values from a table within the job - you can also change the command but getting the data from atable is easier.
========================================== Cursors are useful if you don't know sql. DTS can be used in a similar way. Beer is not cold and it isn't fizzy.
Actually it is an agent calling a .bat file. So, instead of a table could I use a flat file to read in the dates? This way I could train the user to enter the dates in the flat file and save it in a cetain location. Then she could submit a request to have the job ran manually.