Thursday, March 18, 2010

sql-excel

Well, if you are on unix then using the method in the link that I posted.
You need to list down the names of the tables in a file suppose list.txt
you can use the following shell script to generate spool of various tables in xls files.
cat list.txt | while read a
do
echo "spooling $a"
sqlplus username/password@string <set feed off markup html on spool on
spool /home/oracle/$a.xls
select * from $a;
spool off
set markup html off spool off
EOF
done


set feed off markup html on spool on
spool c:\salgrade.xls
select * from salgrade;
spool off
set markup html off spool off

No comments:

Post a Comment