procedure/batch file to export data from sql to excel(predefined path)
998266Apr 5 2013 — edited Apr 5 2013Hi,
I have countries, sites, states tables (total 3) in database (i have user id and password to connect to this database).
every week i need to extract data from these tables into excel files and i need to save those in shared drive for team use.
Currently i am connecting to database every time running sql query and manually exporting that latest data to excel and saving that as excel files in (G:\team\common\) folder with specific name.
output format should be : excel (.xls)
file names should - countries.xls,sites.xls,states.xls
server name : ap21
output location : G:\team\common\ ( G is shared drive).
i heard that we could create batch file to do this task and also we could use oracle procedure to do this task. but not sure which one is the best option.
could you please guide me what is the option and also help me with technical stuff to do this task.