How to format number like this?
Hi,
We need to format a number field in way to add commas and to show decimal values as they are.
The below returns unwanted result:
select to_char(123456789.6545, '999,999,999,999.9999') from DUAL ; > 123,456,789.6545
select to_char(123456789.65, '999,999,999,999.9999') from DUAL ; > 123,456,789.6500
select to_char(123456789.6545, '999,999,999,999.9') from DUAL ; > 123,456,789.7
select to_char(123456789, '999,999,999,999.9999') from DUAL ; > 123,456,789.0000
What we need is as below:
123456789 > 123,456,789
123456789.6 > 123,456,789.6
123456789.47 > 123,456,789.47
123456789.589 > 123,456,789.589
We don't want zeros to show after the decimal part and we don't want any rounding to take place.
Please suggest the format that should be taken to achieve the above.
Thank you,
Christine