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: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 1998/12/01
Message-ID: <3663f6d7.86655494@192.86.155.100>#1/1

A copy of this was sent to Fabian Bakker <fbakke_at_ctp.com> (if that email address didn't require changing) On Tue, 01 Dec 1998 12:37:50 +0100, you wrote:

>Hi,
>
>I want to export data to a ascii, tab delimited file. The linesize is
>set to 2000, because the final select statement will have lots more
>columns.
>
>Now I use the following sql script:
>SET LINESIZE 2000;

set trimspool on
^^^^^^^^^^^^^^^^

trimspool (added in 7.2) trims trailing whitespace from spool files...

>SPOOL C:\OUTPUT.TXT;
>SELECT
>RTRIM(OWNER||CHR(9)||TABLE_NAME||CHR(9)||TABLESPACE_NAME||CHR(9)||RTRIM(CLUSTER_NAME))
>
> FROM SYS.ALL_TABLES;
>SPOOL OFF;
>
>The problem with this script is that their are numerous spaces at the
>back of each line, Those trailing spaces must be trimmed. I don't know
>how to do that.
>
>Thanx in advance,
>
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA

--
http://govt.us.oracle.com/    -- downloadable utilities
 
----------------------------------------------------------------------------
Opinions are mine and do not necessarily reflect those of Oracle Corporation
 
Anti-Anti Spam Msg: if you want an answer emailed to you, 
you have to make it easy to get email to you.  Any bounced
email will be treated the same way i treat SPAM-- I delete it.
Received on Tue Dec 01 1998 - 00:00:00 CST

Original text of this message

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