Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Leading zero before decimal point

583525Jun 28 2007 — edited Jun 28 2007
Hi,
I am trying to format a number so that there is a leading zero before the decimal point.
I am trying
select to_char(.75,'999,999.99') from dual;

But this gives me only .75 as output.
I want 0.75

Is there any easy way to get it (I guess it would be possible with all sorts of decode and lpad combinations, but I want to avoid that! I'm sure there must be some easy way!)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 26 2007
Added on Jun 28 2007
2 comments
8,190 views