Subject Re: [firebird-support] Arithmetic overflow or division by zero has occurred.
Author Huan Ruan
On 30 March 2012 03:21, Ismael L. Donis Garcia <ismael@...>wrote:

> **
>
>
> That operation does not give the precision that I need ( 6 digits after
> decimal point )
>
> SELECT 54311.999455*cast((1/1.000001) as integer) as mount FROM
> MON$ATTACHMENTS r = 54311.999455
>
> 54311.999455 / 1.000001 = 54311,945143
>

Cast one of the numbers in your calculation as "double precision", e.g.

SELECT cast(cast(54311.999455 as double precision)/1.000001 as
numeric(16,6)) as mount FROM rdb$database

Cheers
Huan


[Non-text portions of this message have been removed]