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 ?
 

 SELECT
     cast(
         cast(8975.00038147 as numeric(18,8)) /  cast(1.06 as numeric(18,8))
      as numeric(18,8))
 
 FROM RDB$DATABASE
 

 

 notes : 
 - the values 8975.0038147 come from is a field value. field definition is 
float.
 - the problem that i actually have occured in a procedure where there is a 
computed variable.
 CA_BRUT_HT  = :CA_BRUT_TTC_fact / :TAUX_TVA;

 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,
 Marianne

Reply via email to