Re: ora6 -> ora7 problem

From: Simon Stearn BT group <sjs_at_metagen.co.uk>
Date: Thu, 20 Jan 94 10:29:13 GMT
Message-ID: <1994Jan20.102913.20733_at_metagen.co.uk>


In article <2hdmt8$8h0_at_winx03.informatik.uni-wuerzburg.de>, schmied_at_informatik.uni-wuerzburg.de (Juergen Schmied) writes:
|> I developed a program on the ULTRIX-workstation dec5000/120 with
|> ORACLE V6.0.29.1.1 and i want to port the program to an
|> alpha-station 3000 AXP 300L with ORACLE V7.0.13.1.0.
|>
|> And now the problem:
|> On Oracle V6 all things worked fine. I defined a table to store
|> the names of patients.
|>
|> EXEC SQL CREATE TABLE patient
|> ( id DECIMAL,
|> firstname CHAR(50),
|> secname CHAR(50),
|> ...
|> ...
|> );
|>
|> When i store the name 'Smith' and i want to retrieve the name later,
|> i get 'Smith' from the database back.
|>
|> But with Oracle V7: I get 'Smith '
|> ^^^^^^^^^^^^

The problem is you've created a table with columns of type CHAR. What you need to do is use type VARCHAR2. I believe that there is a commandline option to imp which sets automatic conversion between these types.

You will need to drop all your tables and re import the old database using this option.

|> 50 characters
|>
|> I don't want to edit all sql-statements in my project (it's very big)!
|>
|> What else can i do? Does a migration-tool exist?
|>
|>
|> Thanks,
|> Juergen.
|>
|> --
|>
|> ------------------------------------------------------------------------
|> Juergen Schmied Lehrstuhl fuer Informatik II
|> schmied_at_informatik.uni-wuerzburg.de Universitaet Wuerzburg
|> Tel. 0931 / 888-5852 Am Hubland
|> Fax. 0931 / 888-4602 D-97074 Wuerzburg
|> ------------------------------------------------------------------------

Hope this helps

Simon.

(Only my 1/2p) Received on Thu Jan 20 1994 - 11:29:13 CET

Original text of this message