I am retrieving data from an Oracle 19C Enterprise Edition Database and inserting the data into a staging table held in an Oracle 12C Enterprise Edition Database.
The data is inserted into the staging table without issues, but when querying the staging table and applying the TO_CHAR function to the Nominal column (of type NUMERIC(22,7)), rounding discrepancies occur.
e.g. 2558587897.3899989 is returned as 2558587897.3899999 using TO_CHAR(Nominal, ‘FM999999999999999,9999999’)
Using the TO_CHAR function after removing a few digits from the integer part of the number returns the correct value.
Why does the TO_CHAR function have issues formatting the number 2558587897.3899989?