Reputation: 11
I have an Access DB which has query to retrieve data from teradata. I want to create a batchfile which will execute that particular query.
Upvotes: 1
Views: 33065
Reputation: 794
You can create a macro to run the query and then exit Access, then use a command line switch to automatically run this from a batch file.
Example:
"C:\Program Files\Microsoft Office\Office11\msaccess.exe" "C:\Program Files\Microsoft Office\Office11\samples\northwind.mdb" /X mcrRunQueryAndQuit
More detail on Access command line switches: http://support.microsoft.com/kb/209207
(Should work for Access 2000 - 2010)
Upvotes: 9
Reputation: 54212
VBA for Microsoft Access is your key.
Video tutorial: http://www.youtube.com/watch?v=G9pqmd2PSYk
Upvotes: 0