Question on SQLPLUS (to store query results in a file)
Date: 1996/10/22
Message-ID: <01bbc042$ccaec180$179fdd8e_at_jlaferriere.ey.ca>#1/1
Hi world,
I use SQLPLUS version 3.3 on AIX. I am currently writing
a shell script and I have a problem.
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. All the SQLPLUS commands are
directly in the file containing the shell script. I know that
if I put all the commands in a command file it works
correctly (the output appears only in the file where it is
supposed to be spooled... not in the log file). But I cant
use a command file because I create the WHERE clause
using a parameter transferred to the script and sometimes
there is no WHERE clause (only ;). Here is a piece of my code:
WH='WHERE bla bla bla;'
sqlplus bla/blabla <<eof
SET NEWPAGE 0
SET SPACE 0
SET PAGESIZE 0
SET ECHO OFF
SET FEEDBACK OFF
SET HEADING OFF
SET TERMOUT OFF
--
- Extrait de la table reclamation_fixe
--
SPOOL rec_fix.ext SET LINESIZE 197 COLUMN dt1 FORMAT A8 SELECT r_no_reclam, no_cie, ............ $WH SPOOL OFF SET TERMOUT ON EXIT; eof
Do you have a brilliant idea?
Jocelyne Laferriere
Caron Belanger Ernst & Young
Received on Tue Oct 22 1996 - 00:00:00 CEST