Subject Re: [firebird-support] Err Number 335544779
Author masotti
Hi Isamel,

On 01/03/2011 19:58, Ismael L. Donis GarcĂ­a wrote:
> When executing the following sentence you give me error.
>
> SELECT cast(((163303.39/49.210000) * 49.210000) as decimal(15,2)) as val
> from MON$DATABASE

You overflow max number of decimal digits during calculation.
You can check that also

SELECT cast(((163303.39000/49.210000) * 49.21) as decimal(15,2)) as val
from RDB$DATABASE;

overflows. A single decimal calculation cannot have more than 13 decimal
digits IIRC.
You can anyway:

SELECT cast(cast((163303.39000/49.210000) as decimal(15,2)) * 49.210000
as decimal(15,2)) as val from RDB$DATABASE;

Ciao.
Mimmo.