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

Home -> Community -> Usenet -> c.d.o.server -> Re: How to export table data to a text file?

Re: How to export table data to a text file?

From: Dale Edgar <dale_at_databee.com>
Date: Thu, 20 Sep 2001 14:53:02 GMT
Message-ID: <3baa007c.21524041@news.btclick.com>


Hi Zhou

On Thu, 20 Sep 2001 22:30:18 +0900, "Huiqun Zhou" <zhou_at_ra2.so-net.ne.jp> wrote:

>I'm a newbie for Oracle. Could anyone let me know how to export
>data of a table into a text file? Is exp the right tool?

If what you want to do is load the data back into another Oracle table (perhaps on a different database) then exp is the tool to use.

If what you want is to have a regular text file which can be read by other applications (a spreadsheet for example) investigate the use of the SPOOL command at the SQL*Plus prompt. This will direct a copy of the output you would normally see on the screen to a text file. Anything you can get on the screen will go to the file. Other SQL*Plus commands you will probably useful for this sort of thing are: SET HEADER, SET TRIMSPOOL, SET LINESIZE, SET PAGESIZE and SET FEEDBACK.

Information on the SPOOL command (and the other commands) can be found in the SQL*Plus manual (not the SQL Reference) as they are not part of the SQL standard.

Regards
Dale



DataBee - Oracle DataBase Subsets
The simple and easy way to create small versions of large Oracle databases. http://www.databee.com Received on Thu Sep 20 2001 - 09:53:02 CDT

Original text of this message

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