Re: writing to text file

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Sun, 22 Jul 2001 06:57:20 GMT
Message-ID: <9i59qn026be_at_drn.newsguy.com>


[Quoted] 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
>

[Quoted] [Quoted] 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:20 CEST

Original text of this message