SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Old Forums
 CLOSED - General SQL Server
 Passing variables to batch jobs?
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

AGoss
Starting Member

USA
2 Posts

Posted - 03/24/2004 :  17:19:13  Show Profile
Hey gang....

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?


Thanks,

Andy

tkizer
Almighty SQL Goddess

USA
37161 Posts

Posted - 03/24/2004 :  18:14:50  Show Profile  Visit tkizer's Homepage
No, you can not do that. Why not run the reports from a UI?

Tara
Go to Top of Page

nr
SQLTeam MVY

United Kingdom
12543 Posts

Posted - 03/24/2004 :  18:44:16  Show Profile  Visit nr's Homepage
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.
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
37161 Posts

Posted - 03/24/2004 :  18:48:31  Show Profile  Visit tkizer's Homepage
I understood it to mean prompt the user for the input parameters of the stored procedure.

Tara
Go to Top of Page

AGoss
Starting Member

USA
2 Posts

Posted - 03/24/2004 :  22:37:25  Show Profile
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.

Am I making this harder than it needs to be?

Thanks for your posts,

Andy
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000