Feb 15, 2012 4:09 PM
Formatting a $ value
-
Like (0)
Guys,
I was trying to format $ value say 123456.78 using the following command.
SELECT TO_CHAR( 123456.78, '$999,999,999.99')
And I get the result as -> $ 123,456.78
I was expecting a result like $123,456.78
Is there a simple way to do that? I appreciate your help.
Thanks.
Rajesh
SELECT translate(TO_CHAR( 123456.78, '$999,999,999.99'), ' ', '');
the only problem with using translate is that it is not going to result in a consistent width since it just cuts out the spaces... you could then use lpad on the result if you always want it to use a specific amount of space.

