Subject | Re: [firebird-support] FB 2.1.3 Error: The result of an integer operation caused the most significant bit of the result to carry. |
---|---|
Author | Dimitry Sibiryakov |
Post date | 2009-11-26T16:45:11Z |
> I'm not sure why do I get this message "The result of an integernumeric(18,2)*numeric(18,2)*numeric(18,10) = numeric(18,14).
> operation caused the most significant bit of the result to carry."
> I'm using FB 2.1.3
>
> This is the line that raises exception:
>
> V_DIFF = - V_AMOUNT * V_SIGN * V_RATE;
>
> These are declarations
>
> declare variable v_sign numeric(18,2);
> declare variable v_diff numeric(18,2);
> declare variable v_rate numeric(18,10);
> declare variable v_amount numeric(18,2);
> UsingCast result of one multiplication.
>
> CAST((V_AMOUNT * V_SIGN * V_RATE) as numeric(18,2)
>
> doesn't help
SY, SD.