| Inserting values from lower precision to higher [message #411237] |
Thu, 02 July 2009 12:04  |
hibyte
Messages: 11 Registered: March 2006
|
Junior Member |
|
|
I'm trying to insert some rows from one table (t1) to another (t2).
It is giving me an error:
ORA-01438: value larger than specified precision allowed for this column
The only difference between t1 & t2 is that of one columns which is defined as number(15,9) in t2 (higher precision) where as it is defined as number(15,6) in t1 (lower precision). Rows are inserted into t2(higher precision) from t1 (lower precision)
I thought oracle implicitly converts data during insert.
Any help is appreciated.
[Updated on: Thu, 02 July 2009 12:13] Report message to a moderator
|
|
|
|
| Re: Inserting values from lower precision to higher [message #411239 is a reply to message #411237] |
Thu, 02 July 2009 12:19   |
joy_division
Messages: 4963 Registered: February 2005 Location: East Coast USA
|
Senior Member |
|
|
No, how would you expect Oracle to do this:
SQL> desc g
Name Null? Type
----------------------------------------- -------- ----------------------------
G NUMBER(15,9)
SQL> desc h
Name Null? Type
----------------------------------------- -------- ----------------------------
H NUMBER(15,6)
SQL> insert into h values (1234567);
1 row created.
SQL> insert into g values (1234567);
insert into g values (1234567)
*
ERROR at line 1:
ORA-01438: value larger than specified precision allowed for this column
|
|
|
|
|
|
|
|
|
|