To create shell script for oracle report [message #221022] |
Fri, 23 February 2007 04:42 |
irfanr
Messages: 11 Registered: December 2006 Location: india
|
Junior Member |
|
|
hi.
help me to create a shell script to create a report on oracle database.
i have create a script like:
1.query.sql contains
CONNECT system/manager
SPOOL /home/report.lst
select count(*) from emp;
select count(*) from dept;
SPOOL OFF
exit;
2.query.sh contains
sqlplus /nolog @ /home/query.sql
when i exec the query.sh, it created the report.lst
which looks like
count(*)
---------
15159489
count(*)
---------
585849358
i want the report to look like this
Total Row in EMP Table
count(*)
---------
15159489
Total Rows in DEPT Table
count(*)
---------
585849358
can any one help me on this
thanks
|
|
|
|
|