Subject RE: [firebird-support] Weird Integer Overflow
Author Alan McDonald
> Hi when I execute this sql query
>
> select (("TotalAmount" * (1-("Discount"*0.01)) * (1-("Discount2"*0.01))
> * (1-("Discount3"*0.01)) - "Less" - "Adjustment")) as "GrandTotal"
> from "invoice"
>
> Iam getting a Interger Overflow error. The result of an integer
> operation cause the most significant bit of the result to carry. But I
> don't have any integer field here ... All of them are Numerics(15,2)
> expcept for the discounts field which are numerics(4,2)
>

have you tried using F_FIXEDPOINT on each calculation result?
Alan