Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Convert Oracle data to EXCEL
It's not CSV format, because data can contain ','
and in CSV format this column enclosed by " ",
Moreover data can contain " so in CSV format it
duplicated.
Example:
column data CSV format ----------- ---------- aaaa aaaa bbb,b "bbb,b" ccc"c "ccc""c"
To convert data to CSV format use tool: http://www.simtel.net/pub/simtelnet/win95/database/chyfo171.zip (version 1.7.1, 30k size, platform Win95/98/NT/2000)
Best regards, Dmitry
In article <91a3ra$brr$1_at_nnrp1.deja.com>,
Luggy <dgh_consulting_at_my-deja.com> wrote:
> Hi Amy.
>
...
>
> To make a CSV (option 3) for the following table...
>
> ATABLE
> COL_A DATE
> COL_B VARCHAR2(10)
> COL_C NUMBER(5)
>
> ...you could use the following script in SQL*Plus...
>
> ------------------------cut--------------------------
> set linesize 32767
> set trimspool on
> set termout off
> set pagesize 0
>
> spool atable.csv
>
> select COL_A||','||COL_B||','||COL_C
> from atable;
>
> spool off
> ------------------------cut--------------------------
>
> To create the above file dynamically for multiple tables, I have
> written a PL/SQL script. Please let me know if you'd like this (I can
> email it if so).
>
> HTH,
>
> Dave Henderson.
>
> Sent via Deja.com
> http://www.deja.com/
>
Sent via Deja.com
http://www.deja.com/
Received on Thu Dec 14 2000 - 06:21:13 CST