From: Ivan P. <Iva...@se...> - 2003-07-03 22:28:59
|
> IP> Look at documentation, rules for multiplication: > IP> "If both operands are exact numeric, then multiplying or dividing the operands produces > IP> an exact numeric with a precision of 18 and a scale equal to the sum of the scales of the > IP> operands." > > Whoa, where did you find this? I searched the documentation before > even posting to the list, and now, after I received your answer, I > redownloaded documentation, searched again and still didn't find the > above paragraph! It is in Release Notes. (Beta Doc for IB6) Ivan > > select 5655555.0000 * 32900.0000 from RDB$DATABASE > > > > Result: > > Unsuccessful execution caused by system error that does not > > preclude sccessful execution of subsequent statements. > > Integer overflow. The result of an integer operation caused the most > > significant bit of the result to carry. > > > Look at documentation, rules for multiplication: > "If both operands are exact numeric, then multiplying or dividing the operands produces > an exact numeric with a precision of 18 and a scale equal to the sum of the scales of the > operands." > > Since you are multiplying two numeric(18,4) values, the result must fit into numeric(18,8). > (But your result 186067759500.00000000 is numeric(20,8) ). |