Subject Re: [firebird-support] numeric value is out of r ange
The definition of numeric calculation was changed between dialect 1 and 3 with Interbase 6. This is described in the Interbase 6 getting started (available from the website).

Basically in dialect 1 this type of division overflowed into double precision, it doesn't in dialect 3 and your result doesn't fit and it raises an arithmetic overflow.


----- Reply message -----
Van: "castel.m@... [firebird-support]" <>
Aan: <>
Onderwerp: [firebird-support] numeric value is out of range
Datum: do, okt. 30, 2014 09:14

Hi all, 

I try to figure out why i have a problem in my database since i convert it from firebird 1.5 (dialect 1, no charset ) to firebird 2.5 (dialect 3 and defined charset to utf8).

The following SQL failed in the new database (fb 2.5 dialect 3). It worked in fb 1.5 (dialect 1). 

---->>>> Even if i try to cast the result in a numeric value. ---> That's what i do not understand.

I can understand that a numeric divided by another numeric can give a float... but why the cast does'nt work ?



        cast(8975.00038147 as numeric(18,8)) /  cast(1.06 as numeric(18,8))

     as numeric(18,8))


notes : 

- the values 8975.0038147 come from is a field value. field definition is float.

< p>- the problem that i actually have occured in a procedure where there is a computed variable.


where the three variables are defined as numeric (18,8).

But ibexpert show me the SQL that give the problem (the select i pasted in this mail).

What's the best to do ? working with float variables ?

Thanks in advance for the light you can give me with that problem. 

Best regards,