Oracle version 12.1.0.2.0 running on Linux Redhat 6
select round((25*(11/60)) + (65*(35/60)), 2), round((25*(11/60)) + (65*(35/60))) from dual
Results in
| ROUND((25*(11/60))+(65*(35/60)),2) | ROUND((25*(11/60))+(65*(35/60))) |
| 42.5 | 42 |
I would expect Oracle to round 42.5 to 43 but internally the calculation may be resolving to 42.49999. How do I fix the issue hopefully with an ora init parameter. I could potentially get the value into a number variable and round it but I would like to check with experts before I modify the code in multiple places.
NLS_CHARACTERSET AL32UTF8
NLS_NCHAR_CHARACTERSET UTF8
NLS_NUMERIC_CHARACTERS .,
NLS_LENGTH_SEMANTICS BYTE
Thanks in advance,
Ram L.