[DB-SIG] need help

Carey David SSgt 109CF/SCBJ David.Carey at nyscot.ang.af.mil
Tue Jan 4 13:47:57 CET 2005


It seems a little vague what your trying to do, but I have a suggestion from
what I can gather.
 
go into oracle, at the prompt you need to describe your table. If your table
is called 'customers' you would type
 
desc customers
 
it would give you something that looks like the following.
 
 Name                            Null?    Type
------------------------------- -------- ----
CUST_ID                         NOT NULL NUMBER(5)
CUST_NAME                       NOT NULL VARCHAR2(20)
CUST_PHONE                               VARCHAR2(10) 
 
Print this out or hand copy it. I'm almost positive that the datatypes from
oracle will not match up 100% with the datatypes of MySQL, but I don't have
my SQL Bible on me at the moment to look. This is still fine though because
a lot of the common data types such a char and varchar should match up no
problem. There are tables you can find on the web that will tell you what
datatypes MySQL supports. Go into MySQL and create your new table from the
information you pulled from the oracle describe. I assume since your using
oracle, your familiar with creating tables with SQL, and SQL is SQL pretty
much across most databases. That is how I would convert the table. If I had
to do more then several, then I would probably write a python program to do
it ;-)

Now if you have data that you want to move from one table to the next, I'm
not sure what exactly would be the best method for you. It depends on your
situation. Me personally, I would write a program with 2 database
connections. One to the Oracle database and the other to the MySQL database.
As the program was iterating through a select statement I would
simultaneously have it performing insert statements to the MySQL table I
previously created. Another way might be to put it into a csv file, copy it
to your other machine, then import it somehow.

This is my suggestion. I'm far from a pro at either Oracle or MySQL so there
might be some other way that I don't know of, but as far as I know there
isn't just one simple program or way to do it. However I'm sure if there is,
someone more knowledgeable then myself on the list will comment.

David Carey
Stratton ANGB
Scotia, NY

________________________________

	From: linda [mailto:linda_ferrari9 at yahoo.com] 
	Sent: Monday, January 03, 2005 9:02 PM
	To: db-sig at python.org
	Subject: [DB-SIG] need help
	
	
	hello..
	my name is linda.. i'm student, ineed your help in
	how to convert table in oracle into mysql..
	how to do it that.. i search all in web how to convert that but
their is no solution for me..
	i really need your help for my problem..
	 
	thanks
	LINDA
	


	linda 

	________________________________

	Yahoo! Messenger
<http://uk.rd.yahoo.com/mail/tagline_messenger/*http://uk.messenger.yahoo.co
m>  - Communicate instantly..."Ping" your friends today! Download Messenger
Now
<http://uk.rd.yahoo.com/mail/tagline_messenger/*http://uk.messenger.yahoo.co
m/download/index.html> 



More information about the DB-SIG mailing list