Home » SQL & PL/SQL » SQL & PL/SQL » ora-01440 (10.2.0.1, Windows 2003)
ora-01440 [message #380967] Wed, 14 January 2009 07:58 Go to next message
sant_new
Messages: 165
Registered: June 2008
Senior Member
Hi all,

I'm trying to modify the length of a column aust number(22,2) to aust number(22,4).


alter table incn modify aust number(22,4);

ERROR at line 1:
ORA-01440: column to be modified must be empty to decrease precision or scale


Since I'm increasing the scale, I'm not sure why I get this error. Please give me your thoughts. Thanks.
Re: ora-01440 [message #380968 is a reply to message #380967] Wed, 14 January 2009 08:03 Go to previous messageGo to next message
joy_division
Messages: 4640
Registered: February 2005
Location: East Coast USA
Senior Member
Increasing scale at the expense of shortening the size of the number before the decimal point. Can't do that, even if no data would be affected.
Re: ora-01440 [message #380970 is a reply to message #380967] Wed, 14 January 2009 08:09 Go to previous messageGo to next message
MarcS
Messages: 312
Registered: March 2007
Location: Antwerp
Senior Member
NUMBER(22,2) means numbers with a precision of 22 digits with 2 after the decimal sign and therefore a maximum of 20 digits BEFORE the decimal sign

NUMBER(22,4) means numbers with a precision of 22 digits with 4 after the decimal sign and therefore a maximum of only 18 digits before the decimal sign (and smaller numbers).

Oracle won't allow a decrease in size on columns with values, and even not on empty columns.

Specify NUMBER(24,4) and see what happens.
Re: ora-01440 [message #380973 is a reply to message #380967] Wed, 14 January 2009 08:33 Go to previous message
sant_new
Messages: 165
Registered: June 2008
Senior Member
Thanks for your replies
Previous Topic: How to insert multiple records in single statement
Next Topic: SCD Via Stored Procedures in Oracle
Goto Forum:
  


Current Time: Sat Dec 03 18:18:27 CST 2016

Total time taken to generate the page: 0.24750 seconds