Re: Exporting data to ASCII files - HOW?

From: Dale Cooper <cooper_at_seismo.CSS.GOV>
Date: 2 Jul 1993 14:52:16 GMT
Message-ID: <211i30$630_at_seismo.CSS.GOV>


In article <1230_at_grivel.une.edu.au> janene_at_metz.une.edu.au (Janene Carey) writes:
>
>Reply-To: janene_at_metz.une.edu.au
>Newsgroups: comp.databases.oracle
>References: <7504.2c2aaa9f_at_hayes.com>
>
>From article <7504.2c2aaa9f_at_hayes.com>, by fgreene_at_hayes.com:
>> In article <1993Jun24.062259.22494_at_alf.uib.no>, Gunnar.Sylthe_at_nsd.uib.no writes:
>>> We need to export data from Oracle tables to ASCII files. Is there an easy way to do this?

=>> 
=>> --Gunnar
=> 
=> Assume that you have a table containing fields NAME, ACCT_NO and
=> LAST_SALE_DATE where LAST_SALE_DATE might be a null value.
=> 
=> To extract to an ASCII (flat) file use the following:
=> 
=> 	SET PAGESIZE 0   -- turns off all formatting, column heads, etc
=> 	SPOOL THE_FILE   -- turn on the spooler for output
=> 	SET LINESIZE 132 -- needed if the output is over 80 columns

>Last time I tried this the user needed all data for a record on one line,
>and this meant hundreds of columns and the biggest LINESIZE allowable
>(was it 500? I don't remember) was not big enough. We could have made it
>if the fields had not been padded with blanks, or if RTRIM could be used
>to strip trailing blanks. All in all I found it a frustrating exercise
>and was amazed that it was not more easy!
>
>.. deleted stuff about how to do the select statement..

Is it just me or does anyone else wonder why the capability to dump Oracle database data to ASCII has never been included in the Oracle family of tools?

A while back, an Oracle rep posted a program that would do just that. If it is so easy to whip something up to do this, why hasn't Oracle included it in their bundle of tools? Hmmmmmmmmmmm...

Why is it that one can import ASCII using sqlloader but you can't download data using the same technology? Anyone at Oracle care to comment? Please post, I'm sure a few other folks out here in Netland would love to hear...

Dale Cooper, DBA
Center for Seismic Studies
Arlington, VA Received on Fri Jul 02 1993 - 16:52:16 CEST

Original text of this message