Re: execute the queries that do the record count in sqlplus
Date: Sat, 12 Jul 2008 18:21:21 +0200
Message-ID: <4878DA01.2040107@gmail.com>
Steve schrieb:
> I have a script test1.sql that has the queries that do the record
> count in the tables.
>
> When I run the script in SQLPLUS using @C:\test1.sql, I only got the
> result, but I want to print the queries too so that I know which
> queries corresponding to which result. Any ideas how? thanks!!
>
> test1.sql
> ---------------------------------------------------
> SPOOL C:\test1.txt
>
> SELECT COUNT(*) FROM T1;
> SELECT COUNT(*) FROM T2;
> SELECT COUNT(*) FROM T3;
> SELECT COUNT(*) FROM T4;
> SELECT COUNT(*) FROM T5;
>
> SPOOL OFF
>
> test1.txt
> --------------------------------------------------
> 23221
> 221
> 10933
> 3331
> 131
Please, read about it in the manual
http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12040.htm#sthref2745
Best regards
Maxim Received on Sat Jul 12 2008 - 11:21:21 CDT