Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Convert Oracle data to EXCEL
of course set colsep , is quite a handy command...
-- Niall Litchfield Oracle DBA Audit Commission UK "Luggy" <dgh_consulting_at_my-deja.com> wrote in message news:91a3ra$brr$1_at_nnrp1.deja.com...Received on Thu Dec 14 2000 - 05:47:52 CST
> Hi Amy.
>
> Your easiest options are:
>
> 1. Use MS Query via ODBC (Data > Get External Data > Create New Query).
> 2. Install oraxcel, and use it.
> 3. Create a CSV file in Oracle. Excel can use that.
>
> 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/