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!

decimal part

781692Aug 18 2010 — edited Aug 18 2010
hi all,
i have
SQL> ED
Wrote file afiedt.buf

1* SELECT LTRIM(TO_CHAR(123456.456789,'9999999999999D999')) FROM DUAL
SQL> /

LTRIM(TO_CHAR(1234
------------------
123456.457

The above said query is working fine. but when i enter 0 then i should get 0.000 but i am getting .000(see below) can we get the output like 0.000?
SQL> ED
Wrote file afiedt.buf

1* SELECT LTRIM(TO_CHAR(0,'9999999999999D999')) FROM DUAL
SQL> /


LTRIM(TO_CHAR(0,'9
------------------
.000

Thanks..
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 15 2010
Added on Aug 18 2010
2 comments
690 views