Re: SQLPlus Spooling thru Here Document

From: Brian E Dick <bdick_at_cox.net>
Date: Fri, 10 Jan 2003 14:19:24 GMT
Message-ID: <MDAT9.28679$t06.1161839_at_news2.east.cox.net>


Maybe SET VERIFY OFF?

"Barry Glunt" <barry.w.glunt_at_fmr.com> wrote in message news:ee32c7c9.0301100610.41f27534_at_posting.google.com...
> I am trying to create a Kshell Here Document in order to use variable
> subsitition for the purpose of spooling out some data from an Oracle
> database using SQLPlus. Though I have specified all the usual SET
> options that I would use in an ordinary .sql file to supress output
> other than my data from going to the spool file, I still get a "dirty"
> file.
>
> Thanks for your help!
>
> Here's my Here Doc:
> -------------------------------------------------------------------
> DB_SRC=ora
> LOGON=blah/blah
> TABNAME=txn
> UNL_FILE=txn
> UNL_PATH=/export/home/blah/blahroot/unloads
> echo ------------Starting query-----------------------
> sqlplus -s $LOGON <<EOF > /dev/null
> SET TERMOUT OFF
> SET FEEDBACK OFF
> SET LINESIZE 32767
> SET PAGESIZE 0
> SET TRIMSPOOL ON
> SET RECSEP OFF
> SET COLSEP "|"
> SPOOL ${UNL_PATH}/${DB_SRC}/${UNL_FILE}.${DB_SRC}.unl
> select * from dual
>
> /
> EOF
>
>
> echo Query Completed
> -------------------------------------------------------------------
>
> Here's what I get in the file:
>
> SQL>select*fromdual
> 2
> SQL>/
> X
> SQL>
Received on Fri Jan 10 2003 - 15:19:24 CET

Original text of this message