From: Calin I. P. <pc...@rd...> - 2003-06-27 15:57:26
|
----- Original Message ----- From: "Gabriel Juncu" > GJ> In the stored procedure where I noticed this behavior, I have 3 local > GJ> variables of type numeric(18,4) and I get the above error in a simple > GJ> multiply operation: > > GJ> v2 = 5655555; > GJ> v3 = 32900; > GJ> v1 = v2 * v3; > > GJ> What am I doing wrong? Or is it a bug in Firebird? > Firebird works corectly. You are trying to multiply 2 fixed precision numerics together. Both have precision 4 so you have 10 digits multiplied with 9 digits this results in 19 digits wich is the limit for int64 integer. Therefore you have integer overflow. If you want those two numbers multiplied then do: v1=Cast(cast(v2 as double precision)*cast(v3 as double precision) as numeric(18,4); There you go. Ciao, Best regards, Application Developer Calin Iancu, Pirtea S.C. SoftScape S.R.L. pc...@rd... |