OCIBindByPos(): Value in table has rounded value when insert double value with more than 15 digits.
Hello all,
Oracle version 11.2.0.3.0.
Please help as I find a very weird behavior when inserting a double value into a FLOAT COLUMN.
I am not sure if this is a known limitation, or if I did something wrong.
Here is:
When I insert a 15 digit number, the value inserted into the table is correct.
When I insert a number having more than 15 digits, the value inserted into the table got rounded.
For example:
double double_val = 123456789012345; // 15 digits
double double_val = 1234567890123456; // 16 digits
SQL> select type_float, to_char(type_float,'FM0000000000000000.000')from test_float;
TYPE_FLOAT TO_CHAR(TYPE_FLOAT,'F
Oracle version 11.2.0.3.0.
Please help as I find a very weird behavior when inserting a double value into a FLOAT COLUMN.
I am not sure if this is a known limitation, or if I did something wrong.
Here is:
When I insert a 15 digit number, the value inserted into the table is correct.
When I insert a number having more than 15 digits, the value inserted into the table got rounded.
For example:
double double_val = 123456789012345; // 15 digits
double double_val = 1234567890123456; // 16 digits
SQL> select type_float, to_char(type_float,'FM0000000000000000.000')from test_float;
TYPE_FLOAT TO_CHAR(TYPE_FLOAT,'F
0