Awk script to run a sql and print the output to an output file

Hi All,

I have around 900 Select Sql's which I would like to run in an awk script and print the output of those sql's in an txt file.

Can you anyone pls let me know how do I do it and execute the awk script? Thanks.

Why would you want to run it via awk? That sounds harder than it needs be. You can use the system() function to run your external sql call.

Other than awk, how do I execute all these SQL's and have the output printed in a txt file?

A basic shell script should do..use sqlplus and spool the output to a file...

Try to include all of your scripts into on unix shell as this example:

don't forget to chmod the shell file with 775