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: Export to a ascii, tab delimited file

Re: Export to a ascii, tab delimited file

From: Jurij Modic <jmodic_at_src.si>
Date: 1998/12/02
Message-ID: <3665b61f.9551942@news.arnes.si>#1/1

On Wed, 2 Dec 1998 19:30:27 +0100, "Arjan van Bentem" <avbentem_at_DONT-YOU-DAREdds.nl> wrote:

>Thomas Kyte wrote
>
>>set trimspool on
>
>
>Just for completeness (and please correct me if I'm wrong): this will
>not affect the output of normal SQL queries, which might be captured
>from SQL*Plus using redirection. Like if my_script is:
>
> set trimspool on
> select my_columns
> from my_table;
> exit
>
>then
>
> sqlplus scott/tiger @my_script > my_spool.txt
>
>will still have the trailing blanks.

You are correct, such kind of spooled output is not afected by TRIMSPOOL paramater. Btw, the docs clearly states that "TRIMSPOOL ON does not affect terminal output", and that's what it is in your case - terminal output.

Hovewer, there is another SQL*Plus setting that affects the output of terminal output, but doen't affect the output from the SPOOL command - the setting is called TRIMOUT. If it is set to ON (the default), it will trim the trailing blanks from the output. So if you SET TRIMOUT ON inside your my_script.sql and capture the output with the redirection you'll get the output without the trailing blanks.

>Arjan.

Regards,

Jurij Modic <jmodic_at_src.si>
Certified Oracle7 DBA (OCP)



The above opinions are mine and do not represent any official standpoints of my employer Received on Wed Dec 02 1998 - 00:00:00 CST

Original text of this message

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