Approximation error in decimal data type conversion in oracle mode
WoongChoi 505V5WD6N5 Visits (6405)
When oracle mode is used in db2, you might see the approximation error when you convert a value to decimal data type while original DB2 does not make this error. This is because the oracle mode follows the decflt_rounding from database cfg which would have an approximation error.
Please check the following example which shows difference between original db2 and oracle mode.
SQL: db2 -x "values deci
oracle mode output: 0.10
db2 mode output: 0.10
As you can see, oracle mode shows the approximation error.
For db2 conversion rule, please check the following links for detail.