Subject Problems with Numeric(18,5)
Author guido.klapperich@t-online.de
I have a following test-table
CREATE TABLE NEW_TABLE (
MONEY1 NUMERIC(18,4),
MONEY2 NUMERIC(9,4),
MONEY3 NUMERIC(18,5));

INSERT INTO NEW_TABLE (MONEY1,MONEY2,MONEY3) VALUES
(-70000,-70000,-70000);

Now the query:
select money1,money1/1.95583,
money2,money2/1.95583,
money3,money3/1.95583
from new_table

and the result:
MONEY1 F_1 MONEY2 F_2 MONEY3
F_3
-70000 -35.790,431684 -70.000,000000 -35.790,431684 -70.000,000000
1.936,250234

When the field is Numeric(18,5), then IB calculates wrong. Exists
therefore a logical solution or is it a bug ?


Guido