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!

explain to_char

1061748Jan 28 2016 — edited Jan 28 2016

Hello Experts,

I have a question on to_char function. I have read the documentation but some type of confusion is lingering my mind. I hope someone can shed some light on this

i have a confusion on 9 - numeric width and 0 -- displaying leading zero's formats

select to_char(1890.5 ,'$0G000D00') from dual -- returns $1,890.55    ( Might be dumb but what does 0 mean here?)

similarly select to_char(1890.5 ,'$99G999D00') from dual -- returns $1,890.55

can anyone clearly explain how conversion happens here?

This post has been answered by Frank Kulash on Jan 28 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 25 2016
Added on Jan 28 2016
7 comments
983 views