Subject Re: [firebird-support] division operation doesn't returns decimals ref/eDN2041595759
Author Ann W. Harrison
Praxi Technical Support - Dennis Th./F. wrote:
>
> but generally when I do calculations (in sum()), in precise multiplies with
> 4 decimals, I get the error
>
> 'arithmetic exception, numeric overflow, or string truncation'
>

The problem is that - following the dictates of one interpretation
of the SQL standard - Firebird does not do any internal rounding in
arithmetic operations. So, if you have a number that is 15,7 and
you multiply it by a number that is also 15,7, the result has 14
digits after the decimal point. If the result has more than two
digits before the decimal point, you've got an overflow.

Regards,


Ann