Re: Save to ASCII format

From: Dave Mausner <dmausner_at_brauntech.com>
Date: 1996/10/12
Message-ID: <53ourm$1eg_002_at_dmausner.brauntech.com>#1/1


In article <53mijd$jh5_at_rumors.ucr.edu>, Yenlien Phan <yphan_at_cs.ucr.edu> wrote:
>Anyone know how to export an Oracle table to ASCII
>(comma delimited or fixed-length) format??

to get comma-delimited ascii, you write code which looks like this:

select

        col1 || ',' ||
        col2 || ',' ||
        ...
from
        my_table
where
        ...

to get fixed-length ascii, you write code like this:

set linesize <plug in sum of all column widths> set space 0 numw 9 pages 0
select

        col1,
        col2,
        ...
from
        my_table
where
        ...

for varchar columns nothing additional is required. for number fields, you can set "numw" or use to_char(col3,'999990') to obtain any size you wish.

--
Dave Mausner, Consulting Manager, Braun Technology Group, Chicago.
Received on Sat Oct 12 1996 - 00:00:00 CEST

Original text of this message