Re: Exporting ascii files

From: Erik E. Graversen <crieeg_at_halcyon.com>
Date: 28 Sep 1993 00:32:23 -0700
Message-ID: <288pa8$p4u_at_nwfocus.wa.com>


In article <UgdjujG00VBKAPqVIN_at_andrew.cmu.edu>, Serge Taylor <st0u+_at_andrew.cmu.edu> wrote:
>I'm new to Oracle and may have missed something
>in the documentation of the Export facility, but I cannot
>figure out how to export data from a table in ascii format
>(rather than oracle binary), with control over the kind of
>deliminter between fields (blank space is preferred).
>I need a file with only the data, one row per line, in ascii,
>separated by a space.
>Is there some easy way to do this?

Use sqlplus to do the export one table at a time... i.e. with TABLE T ( col1 char(10), col2 number ) do (in sqlplus)

set pagesize 0 linesize LongEnough
spool T.lst
select col1|| ' '||col2 from T;
spool off

instead of the space you can use any other delimiter you want, I often find that the ~ char is not used in the tables I work with. The reason for using the concatenate, ||, is to avoid having sqlplus blankpad each col to it's max width which makes it more difficult to extract the data again.

Hope this helps...
Erik E. Graversen
>Thanks,
>Serge Taylor
>
>(I'm using oracle v.6 on a sparcstation)
Received on Tue Sep 28 1993 - 08:32:23 CET

Original text of this message