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" <[EMAIL PROTECTED]>
> Organization: Fat City Network Services, San Diego, California
> Reply-To: [EMAIL PROTECTED]
> Date: Mon, 18 Jun 2001 14:10:55 -0800
> To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
> 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: [EMAIL PROTECTED]
> 
> 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: [EMAIL PROTECTED] (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: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).

Reply via email to