Basically, I have an excel sheet with numerous select statements; wondering what’s the quickest way to run all these and return the data to a file or query analyzer result window.
These are really simple select statements, they are basically
SELECT A, B, C FROM VIEW WHERE ID = '00001'
but there are about 200 hundred of these so I am wondering what’s a fast way to run these
If you simply want to run them all in succession, and save the output, you can do something like this:
Copy them to a plain text file, call it my_queries.sql, then add a line at the top that says:
and then add a line to the end of the file:
Then you can connect via SQL*plus:
and then run the script with:
You’ll end up with all the results in the spool file, my_queries.lst.
Hope that helps.