Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL*Plus question

Re: SQL*Plus question

From: <fitzjarrell_at_cox.net>
Date: 1 Feb 2005 08:54:09 -0800
Message-ID: <1107276849.678096.139370@c13g2000cwb.googlegroups.com>

Andy Kent wrote:
> Many thanks - this works well. I can put everything in a single,
simple
> shellscript this way.
>
> How can I suppress most or all of the spurious output? i.e.:
>
>
> Connected to:
> Oracle8i Enterprise Edition Release 8.1.7.3.0 - 64bit Production
> With the Partitioning option
> JServer Release 8.1.7.3.0 - 64bit Production
>
> SQL> SQL> SQL> SQL>
> DATA
> ----------
> ABCDEF
> SQL> 2 old 2: where &flag=0
> new 2: where 1=0
> SQL> Disconnected from Oracle8i Enterprise Edition Release 8.1.7.3.0
-
> 64bit Pro
> duction
> With the Partitioning option
> JServer Release 8.1.7.3.0 - 64bit Production
> I only really want to see the data and heading.
>
> Andy

Without using 'set termout off' and spooling to a file you'll see the banner. You can stop the 'old..new' output with:

set verify off

If you should choose to spool the output to a file your script might look like this:

set termout off verify off feedback off

def flag=0
col flag noprint new_value flag
select table1.*, 1 flag from table1 where key=value; select * from table2 where key=value and &flag=1

spool myoutput.lst
/
spool off
exit

Your spool file would be absent any banner, and would contain the header and data. You may want to set your pagesize to larger than 14 (the default upon connecting to SQL*Plus) to reduce the number of header lines in your file.

David Fitzjarrell Received on Tue Feb 01 2005 - 10:54:09 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US