Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Export from sql plus

Re: Export from sql plus

From: Jon Walthour <jwalthour_at_mac.com>
Date: Mon, 18 Jun 2001 15:32:12 -0700
Message-ID: <F001.0032DEC5.20010618154020@fatcity.com>

What about:

set head off
set feed off
set pages 0
set lines 10000
set trims on

spool c:\mytable.lst

SELECT '"' || col1 || '","' || col2 || '","' || col3 || '","' || ... || '"'   FROM mytable;

spool off

or, if you wanted to do it for later import, change the SELECT to:

SELECT 'insert into another_table values(' || col1 || ',' || col2

       || ',' || ... || ');'
  FROM mytable;

Is this what you are looking for?

-- 

Jon Walthour, OCDBA
Oracle DBA
Computer Horizons
Cincinnati, Ohio



> From: "Mark Liggayu" <markliggayu_at_allweatherwindows.com>
> Organization: Fat City Network Services, San Diego, California
> Reply-To: ORACLE-L_at_fatcity.com
> Date: Mon, 18 Jun 2001 14:10:55 -0800
> To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
> Subject: Export from sql plus
>
> Is it possible to export the whole content of a table to a file. If is it ,
> what is the command to do this?
>
> Thanks,
> Mark
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Mark Liggayu
> INET: markliggayu_at_allweatherwindows.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Jon Walthour INET: jwalthour_at_mac.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Received on Mon Jun 18 2001 - 17:32:12 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US