Re: sql*plus column format remove whitespace
Date: Thu, 28 Oct 2004 18:22:55 +0200
Message-ID: <41811c14$0$16135$626a14ce_at_news.free.fr>
"Alok Bisani" <alok_bisani_at_yahoo.com> a écrit dans le message de
news:f28905db.0410280225.23ca2f21_at_posting.google.com...
> Hi,
> Is there a column format in SQL*PLUS to trim whitespace? For eg.
> the following query output
> SQL> select owner, table_name, tablespace_name, cluster_name from
> all_tables where rownum < 2;
>
> OWNER TABLE_NAME
> ------------------------------ ------------------------------
> TABLESPACE_NAME CLUSTER_NAME
> ------------------------------ ------------------------------
> SYS UNDO$
> SYSTEM
>
>
> SQL>
>
> should be something like this.
> SQL> select owner, table_name, tablespace_name, cluster_name from
> all_tables where rownum < 2;
>
> OWNER TABLE_NAME TABLESPACE_NAME CLUSTER_NAME
> ----- ---------- --------------- ------------
> SYS UNDO$ SYSTEM
>
>
> SQL>
>
> This is required to output a CSV file from a query. I can do a string
> concatenation of all the columns with a comma in between, but sure
> there is a 4000 or someother limit to that?
To get a CSV output format use:
set underline off
set colsep ';'
This does not trim whitespaces but you'll get fields separated with ;
-- Regards Michel CadotReceived on Thu Oct 28 2004 - 18:22:55 CEST