N | F_D99 | F_D90 | F_D00 | F_FM_D99 | F_FM_D90 | F_FM_D00 |
.9 | # 0.90# | # 0.90# | # 0.90# | #0.9# | #0.90# | #0.90# |
.95 | # 0.95# | # 0.95# | # 0.95# | #0.95# | #0.95# | #0.95# |
1 | # 1.00# | # 1.00# | # 1.00# | #1.# | #1.00# | #1.00# |
1.05 | # 1.05# | # 1.05# | # 1.05# | #1.05# | #1.05# | #1.05# |
1.1 | # 1.10# | # 1.10# | # 1.10# | #1.1# | #1.10# | #1.10# |
I learned something new today about an Oracle function I have been using for almost 20 years... Never a dull moment :-)
If you use to_char like this: to_char(1, '990D99') you get "1.00", with some leading spaces.
However if you use this: to_char(1, 'fm990D99') you get "1.".
The
Oracle documentation on Format Models states
"FM: Fill Mode. Oracle uses trailing blank characters and leading zeroes to fill format elements to a constant width. [...] The FM modifier suppresses the above padding in the return value of the TO_CHAR function.".
I found no mention of removing trailing zeros, so still not sure why FM creates this difference.