Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Comma separated file

Re: Comma separated file

From: Howard J. Rogers <dba_at_hjrdba.com>
Date: Tue, 16 Jul 2002 09:50:17 +1000
Message-ID: <agvn2g$9r$1@lust.ihug.co.nz>


CLOBS are always a worry. (Ever tried doing it with a BLOB???!)

For dates, you need to use the to_char function around your data.

But the real point is... yes, this is the basic way to extract data from an Oracle database as a CSV.

If you really want CLOB data, you're going to have to delve into PL/SQL.

Regards
HJR "Murty Adavi" <adavi_at_attbi.com> wrote in message news:SRIY8.51055$uw.28021_at_rwcrnsc51.ops.asp.att.net...
> Given a table, is there any way of extracting the data and create a
> Comma-separated ASCII text file ?
> I tried using the following .....
>
> SQLPLUS > SPOOL TEST.DAT
> > set pagesize 0
> > select COLA || ',' || COLB || ',' || COLC from
> TEST_TAB
>
> ...but I am sure there should be a better way of doing this as this
method
> doesn't properly get
> some of the datatypes like DATE, CLOB, etc.
>
> Thanks
> Murty
>
>
>
>
Received on Mon Jul 15 2002 - 18:50:17 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US