Page 1 of 1

Data Issue with Datatype

Posted: Thu Dec 12, 2013 7:28 pm
by vamsi.4a6
Source is Oracle Table and target is also oracle table.

Col1 is Number datatype in source table and Col1 is Float(126) datatype in Target table.One to one mapping between source and target.In Datastage job i am reading col1 as Decimal 38,10 and propagating this field till target.In some cases I am not getting correct output.

SOURCE:

COL1
-10240547.950000

current output:
COL1
-10240547.949999999

expected output:
COL1
-10240547.950000

TO be short what ever it is there in source i need in target with out rounding.

Posted: Thu Dec 12, 2013 10:35 pm
by chulett
Not really any different from your other post discussing this data type I'm afraid.

Posted: Thu Dec 12, 2013 10:38 pm
by ray.wurlod
No computer can store float data type accurately 100% of the time. There are IEEE papers out there explaining why. You could try changing the data type to DECIMAL(38,2) or using explicit rounding functions.