|
|
|
Re: ORA-01426 "Numeric Overflow" [message #658780 is a reply to message #658779] |
Tue, 27 December 2016 01:05 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
It appears that the result goes into infinity. Is the formula correct? Do COL2 and COL3 look all right (I mean, do their values make sense in this context)?
The POWER (n2, n1) says (quoting Oracle doc.): POWER returns n2 raised to the n1 power. The base n2 and the exponent n1 can be any numbers, but if n2 is negative, then n1 must be an integer.
Therefore, as - in the first POWER function n1 is not an integer, then COL2 shouldn't be negative. Can you check COL2's sign?
As of COL3, it can be (virtually) any positive number (as that POWER returns 0 in that case), but it can't be much less than -1E4, so - check its range in the TABLE_NAME.
[Updated on: Tue, 27 December 2016 01:05] Report message to a moderator
|
|
|
|
Re: ORA-01426 "Numeric Overflow" [message #658796 is a reply to message #658783] |
Tue, 27 December 2016 07:32 |
Bill B
Messages: 1971 Registered: December 2004
|
Senior Member |
|
|
you should not store calculate values that can be gotten from the other columns. it is too easy to get out of sync if you change one of the columns used in the calculation. If your are running oracle 11 or above I would make the calculation as a virtual column containing the calculation and a constraint to stop col2 and col3 from being zero or null.
|
|
|