Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Comma separated file
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