Why numeric data truncated to be integer when declaring NUMBER data type in Oracle 10g

5 pts.
Tags:
Oracle 10
Oracle NUMBER data type
Hello, My company recently upgraded Oracle server form 9i to 10g and I was requested to load all tables data from 9i to 10g. Most data transfer are good except this situation: If 9i table with date type declared as NUMBER, all numeric data will be truncated as integer in 10g (I used the same data type NUMBER in 10g) I tried to test by myself in 10g so I made a small table as CREATE TABLE temp_P( ADD_WITHDRAWAL NUMBER, MKVAL NUMBER) ; and I insert data as: insert into temp_p values(2.33,3.45); Now I select this table, data will be 2 and 3. All decimal numbers are truncate to be integer. I tried to google on internet but can't find any help about this issue. Could anyone help to solve this problem without changing data type (I know it works fine if declared as NUMBER(8,2). But if it works fine in 9i with NUMBER data type, it doesn't make sense why not working in 10g). Thank you very much for help.
ASKED: November 30, 2007  9:55 PM
UPDATED: December 3, 2007  10:50 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

I am not sure why is it behaving like this, but doesn’t at my end, here is your table output.

SQL> select version from v$instance;

VERSION
—————–
10.2.0.1.0

SQL> CREATE TABLE temp_p(
2 add_withdrawal NUMBER,
3 mkval NUMBER);

Table created.

SQL> insert into temp_p
2 values(2.33,3.45);

1 row created.

SQL> select * from temp_p;

ADD_WITHDRAWAL MKVAL
————– ———-
2.33 3.45

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following