Page 1 of 1

DB2 precision problem

Posted: Thu Dec 16, 2004 1:36 pm
by yiminghu
Hi,

I have a DB2 table, one field in this table is double type. When I dumped this table into file through datastage, it seems it loses precision. For example: a value '3.29999995231628' becomes '3.299999952', even though the column definition is specified as double.

Has anyone evern experienced same situation? What should I do?

Thanks,

Carol

Posted: Thu Dec 16, 2004 5:13 pm
by davidnemirovsky
This could be due to Operating System restrictions. What OS is on the server? Is Datastage on the same server as DB2?

Posted: Thu Dec 16, 2004 6:36 pm
by yiminghu
djhigh wrote:This could be due to Operating System restrictions. What OS is on the server? Is Datastage on the same server as DB2?
DB2 and Datastage are installed on different servers. The OS is AIX 5.1 and 5.2

Posted: Thu Dec 16, 2004 6:56 pm
by davidnemirovsky
When viewing the value in the DB2 client the value is: '3.29999995231628'

and then when viewing through datastage it becomes '3.299999952' ?

Try 'Double' as the SQL Type or 'Float' with a Precision value of 14 or greater if required (I believe you can go up to a precision of 308).