execute the queries that do the record count in sqlplus

From: Steve <javacc2_at_gmail.com>
Date: Sat, 12 Jul 2008 08:27:44 -0700 (PDT)
Message-ID: <f4445392-88b7-4a14-99a4-2f7866002599@34g2000hsh.googlegroups.com>


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 Received on Sat Jul 12 2008 - 10:27:44 CDT

Original text of this message