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: SQL*Plus question

Re: SQL*Plus question

From: Lars Waernulf <l.waernulf_at_upright.se>
Date: Thu, 13 May 1999 12:56:27 GMT
Message-ID: <%Zz_2.76$Qy3.123@news.flash.net>


Hi jimmy,

try this
spool a.txt
select columnA || ',' || columnB || ',' || columnC || ',' || columnD from
AAA;
spool off

Jimmy wrote in message <373B9A0A.BBDEBDEA_at_comp.polyu.edu.hk>...
>Hello all,
>
> I have the following sql file running in SQL*Plus:
>
> spool a.txt
> select columnA || ',', columnB || ',', columnC || ',', columnD from
>AAA;
> spool off
>
>Results: (content of a.txt)
>columnA, columnB, columnC, columnD
>11, ABC, 01-Jan-1998, Testing
>1234, DEFG, 01-Jan-1999, Hello This is testing
>
>134, A, , Testing
>Testing...
>
> However, I want to use SQL*PLUS to get the following results:
>
>Results: (content of a.txt)
>columnA,columnB,columnC,columnD
>11,ABC,01-Jan-1998,Testing
>1234,DEFG,01-Jan-1999,Hello This is testing
>134,A,,Testing Testing
>
> i.e., no space between two column values. Is it possible to do that
>in running sql file in SQL*Plus?
>
>Thanks,
>Jimmy
>
Received on Thu May 13 1999 - 07:56:27 CDT

Original text of this message

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