Re: Export from Oracle in comma-separated format
Date: 1997/01/25
Message-ID: <Va7hyGAYzc6yEwC6_at_jimsmith.demon.co.uk>#1/1
In article <32E64886.5CD_at_bga.com>, BoB Pierce <rjpierce_at_bga.com> writes
>Is there an easy way to dump an Oracle table in comma-separated format?
>I wrote a simple SQL report, changing the column separator to ',' but
>all the columns are padded with spaces. I just want
>value1,value2,value3 not value1 ,value2 , etc.
>
>Every other DB I've ever seen spits out CSV at the touch of a button.
>Surely I'm missing something here.
Try concatenating the columns together, as in
select col1||','||col2||','||col3
from table
The advantage of oracle's method is flexibility. You can have any separator you like, and you can combine data from multiple tables, or include derived data in your output file. Most other databases only do a single table at a time.
-- Jim SmithReceived on Sat Jan 25 1997 - 00:00:00 CET