Re: writing to text file

From: George E. Gifford <george.gifford_at_dfrc.nasa.gov>
Date: Sun, 22 Jul 2001 06:57:21 GMT
Message-ID: <3B463C8A.67467F0F_at_dfrc.nasa.gov>


[Quoted] Setting Colsep to a tab character and then spooling to a file does not, in my efforts, produce a proper tab-delimited file. Somewhere in the translation the results are the same as using the default for colsep. Even using -Set Tab On- will not produce the expected results. I could very well be missing something here, but I have only had success with using CHR(9) between fields, with and without using concatenation.

Thomas Kyte wrote:

> In article <3B45D984.54F7C478_at_attws.com>, "Daniel says...
> >
> >"Andrei V. Kirilenkov" wrote:
> >
> >> hi
> >> if you are using the standart SQL+ then use
> >> spool file_name
> >> Oracle will copy into file_name the SQL+
> >> output Brian Janko <brian_at_jankoNOnet.SPAMcom.INVALID> wrote in message
> >> news:0H517.2723$Pf4.313156_at_bin1.nnrp.aus1.giganews.com...
> >> > How can I get the results of several SQLPlus queries to Oracle to write
> >> > their results into a single tab-delimited text file?
> >> >
> >> > Thanks,
> >> > Brian
> >> >
> >> >
> >> >
> >
> >How do you spool a tab delimited file?
> >
> >Daniel A. Morgan
> >
>
> well, one answer would be goto technet and look it up. Its right there in the
> sqlplus guide ;)
>
> Another way would be to show you
>
> scott_at_8i> set colsep ' ' <<<=== thats a TAB in there
> scott_at_8i> set heading off
> scott_at_8i> set feedback off
> scott_at_8i> set embedded on
> scott_at_8i> set pagesize 10000
> scott_at_8i> spool foo.csv
> scott_at_8i> select * from emp;
> scott_at_8i> spool off
>
> --
> Thomas Kyte (tkyte_at_us.oracle.com) http://asktom.oracle.com/
> Expert one on one Oracle, programming techniques and solutions for Oracle.
> http://www.amazon.com/exec/obidos/ASIN/1861004826/
> Opinions are mine and do not necessarily reflect those of Oracle Corp
Received on Sun Jul 22 2001 - 08:57:21 CEST

Original text of this message