Re: Transferring Data from Old Database to Excel File Using SQLPLUS

From: Mark Bole <makbo_at_pacbell.net>
Date: Thu, 15 Apr 2004 23:17:53 GMT
Message-ID: <BKEfc.37282$FN.32417_at_newssvr29.news.prodigy.com>


Alexander Heimann wrote:
> I have the task ahead of me to map some old data from an old database
> to a new system. I was given this task and no documentation of the
> database. I also only have sqlplus access to the DB. Itis oracle
> version 8.1.5.0.2
>
> I have used the desc 'tablename', to get a feel of the table
> structures. I am planning on just creating some select queries to
> extract the data, spool them and then export them to a .csv file where
> i can then insert into the new database. My question i am having some
> problems with formatting the output of my queries. Do i need to set
> the linesize to a certain height? is there an easy way to figure out
> how wide i need it? the table structure of the first table is as
> follows. I am also not sure how to deal with mapping out the
> constraints. The new system i am importing the data into has a
> modeling feature so if i can get all the data into one flat file i can
> then go from there. Thanks in advance..
>
[...]

Here's a start:

http://asktom.oracle.com/~tkyte/flat/index.html

Flat files generally don't support the notion of constraints, so don't worry about that. But you do have to decide how to represent null values.

SQL*Plus "linesize" refers to the max number of characters in an output line.

"modeling feature" could mean anything. Perhaps if you use Oracle tools to dump the tables as XML, your new system might be able to understand it, but that is going to take a significant amount of research and testing on your part, it sounds like.

HTH, Mark Bole Received on Fri Apr 16 2004 - 01:17:53 CEST

Original text of this message