WITH t AS ( SELECT 123123.4444 v FROM dual UNION ALL SELECT 123123.444 FROM dual UNION ALL SELECT 123123.44 FROM dual UNION ALL SELECT 123123.4 FROM dual UNION ALL SELECT 123123 FROM dual UNION ALL SELECT 0 FROM dual UNION ALL SELECT 0.1 FROM dual UNION ALL SELECT 0.01 FROM dual ) SELECT v , RTRIM(TO_CHAR(v, 'fm999,999,990.999999999'), '.') x FROM t ;