Home » Other » Client Tools » How to run multiple sql queries in SQL Navigator or Toad to get output in Excel format (Oracle 10g)
How to run multiple sql queries in SQL Navigator or Toad to get output in Excel format [message #523343] Fri, 16 September 2011 16:15 Go to next message
rtnataraj
Messages: 102
Registered: December 2008
Senior Member

I have some 120 sql files (all select statements)
I have to execute all those and generate output in Excel format
How to do this in SQL Navigator or Toad

Please help

Thanks in advance.
Re: How to run multiple sql queries in SQL Navigator or Toad to get output in Excel format [message #523346 is a reply to message #523343] Fri, 16 September 2011 17:07 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
http://www.lmgtfy.com/?q=oracle+select+excel
Re: How to run multiple sql queries in SQL Navigator or Toad to get output in Excel format [message #523404 is a reply to message #523343] Sat, 17 September 2011 14:15 Go to previous messageGo to next message
wvu1999
Messages: 40
Registered: April 2007
Member

Use F5 to execute multiple sql statements.

You'll need to then export each of the resultsets to Excel.

I would recommend you use SPOOL to create a CSV file for all of those statements.
Re: How to run multiple sql queries in SQL Navigator or Toad to get output in Excel format [message #523412 is a reply to message #523404] Sat, 17 September 2011 20:12 Go to previous messageGo to next message
rtnataraj
Messages: 102
Registered: December 2008
Senior Member

i know how to run a single script and export that to excel
but this takes much time to execute all 120 scripts one by one.
i'd appreciate if there's any way to run all scripts through a batch process automatically.
btw, thanks for the response Smile ,wvu1999

thanks,
Nataraj.
Re: How to run multiple sql queries in SQL Navigator or Toad to get output in Excel format [message #523413 is a reply to message #523412] Sat, 17 September 2011 20:19 Go to previous messageGo to next message
wvu1999
Messages: 40
Registered: April 2007
Member

Sorry, didn't realize you had multiple scripts, vs one script with 100+ queries in it.

Use Toad's automation designer, available under the utilities menu.

Create a new app.

Add the 'Execute Script' action.

Select your files.

For the output, direct it to a single file, or one per script - whatever you prefer.

This won't do Excel however. I would still recommend you use SQL*Plus in combination with the Spool command to build you a series of CSV files.

Or do it in Toad - we support the SQL*Plus commands.

Re: How to run multiple sql queries in SQL Navigator or Toad to get output in Excel format [message #523414 is a reply to message #523412] Sat, 17 September 2011 20:19 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
It would be helpful if you followed Posting Guidelines - http://www.orafaq.com/forum/t/88153/0/


>i know how to run a single script and export that to excel
>but this takes much time to execute all 120 scripts one by one.
>i'd appreciate if there's any way to run all scripts through a batch process automatically.

so create a 120 line "wrapper" script & then launch it.
Re: How to run multiple sql queries in SQL Navigator or Toad to get output in Excel format [message #523415 is a reply to message #523413] Sat, 17 September 2011 22:56 Go to previous messageGo to next message
rtnataraj
Messages: 102
Registered: December 2008
Senior Member

@wvu1999: "Add the 'Execute Script' action."

i've created an App in the automation designer but i'm finding difficult to figure out how to add 'Execute Script' action. Sad

Please help.

Thanks,
Nataraj
Re: How to run multiple sql queries in SQL Navigator or Toad to get output in Excel format [message #523421 is a reply to message #523415] Sun, 18 September 2011 08:14 Go to previous message
wvu1999
Messages: 40
Registered: April 2007
Member

Create a new app.

On the 'DB Misc' page, select the 'Execute Script' action.

Then in the Action list, double-click - this will add the selected action.

Then right-mouse-click to set the properties.
Previous Topic: Experience using "Code review options" in Toad formatter
Next Topic: error while loading shared libraries: libskgxp10.so: when Sqlplus login with Unix root
Goto Forum:
  


Current Time: Sun Dec 22 01:24:37 CST 2024