Re: Question on SQLPLUS (to store query results in a file)

From: Mark Styles <lambic_at_msn.com>
Date: 1996/10/23
Message-ID: <326E4918.6A0F_at_msn.com>#1/1


ERNST & YOUNG wrote:
> I set what it is needed to spool the output on a file. All is
> working ok, except that my output also appear in my
> log file. I dont want my output in the log file, but only in
> the file where I spool.
>
> WH='WHERE bla bla bla;'
>
> sqlplus bla/blabla <<eof
> [sql snipped]
> eof
>
> Do you have a brilliant idea?

Redirect the output from sqlplus somewhere else, either to another file, like this:

sqlplus bla/blabla <<eof > /tmp/sql.log
-- sql stuff
eof

or to null, like this:

sqlplus bla/blabla <<eof > /dev/null
-- sql stuff
eof

if you want to redirect error messages too, then add 2>&1 after the redirection. Received on Wed Oct 23 1996 - 00:00:00 CEST

Original text of this message