shell script to run .sql files

hi Friends,

Please help me in writing shell script to run list of sql files.
database is Oracle 9i,
unix os is solaris
Requirement is

  1. sql file must take two inputs a)feed id and b)business date
    2.shell script must out put .xls or .csvfile as out put without trimming any column name and column value.
    result of the sql may return around 60000 records...

please provide sample .sql file ans sample unix shell script.

thanks in advance..
--bali

you can try as shown below

 
echo "enter feed id : \c"
read feed_id
echo "enter date : \c"
read buss_date
sqlplus -s / << EOF
##to stop trimming column name you can use 
column "column_name" format a(columnsize in no)
set page size 60000
spool query_result.csv
####your query here####you can use $feed_id and $buss_date in your query as you want
exit
EOF