Re: SQL*(UN)LOADER / Export Oracle Tables into TXT-File

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 4 Feb 2003 16:22:11 -0800
Message-ID: <92eeeff0.0302041622.6b968df9_at_posting.google.com>


"Tino Korth" <korthNOSPAM_at_mhr.de> wrote in message news:<b1oat2$53f$1_at_ngspool-d02.news.aol.com>...
> Hallo,
>
> I need an equivalent command for the MySQL-SELECT
>
> SELECT * INTO OUTFILE "/tmp/mysql_out.csv" FIELDS TERMINATED BY ','
> OPTIONALLY ENCLOSED BY '"' FROM tblDaten"
>
>
> Does there something exist for oracle that's doing the same?
> I found with Google some answers that Oracle doesn't support ASCII-Export of
> files ... ist that right?
>
>
> Greetz from Germany!
>
> Tino

Look up usage of SPOOL keyword or UTL_FILE package. e.g.

Using sqlplus,

SET ECHO OFF
SET VERIFY OFF
SET FEEDBACK OFF
SET HEADING OFF
SET TERMOUT OFF SPOOL /tmp/mysql_out.csv
SELECT COL1 ||','||COL2||','||COL3 ....
FROM tblDaten;
SPOOL OFF Regards
/Rauf Sarwar Received on Wed Feb 05 2003 - 01:22:11 CET

Original text of this message