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

From: Rolf Unger <rolf.unger_at_ctilabs.de>
Date: 6 Feb 2003 02:42:41 -0800
Message-ID: <32fe19ad.0302060242.16519cf3_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?
>

Well, that's right in a sense that there is not a single SQL-command or external utility that does that for you, but you can help yourself with SQL*Plus and its SPOOL syntax. (Note: SPOOL is not part of the SQL interpreter it's a command for the SQL*Plus terminal, you don't need to terminate those commands with a semicolon. It's somehow comparable to the mysql commands \s, \n or \p.)

So for exporting data you will have to write some scripts that you will execute with 'sqlplus'.
Tom Kyte has some nice examples and explanations on how to do this: See http://osi.oracle.com/~tkyte/flat/index.html

The downloadable files are at: osi.oracle.com/~tkyte/flat/unloader.zip

Rolf. Received on Thu Feb 06 2003 - 11:42:41 CET

Original text of this message