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!

How to forbid to_char(0,'9G999G999D00') to return .00 ?

leinadjanFeb 10 2011 — edited Feb 10 2011
Hi,

I never understood why the TO_CHAR function with a mask like '9G999G999G999D00' return something that isn't a proper formated number. Whatever language you are using, separator + 00 isn't a valid number.

How can we prevent that thing ? Shouldn't it fix by Oracle ?

It makes me headaches to write codes to correct that. Even by using the default value it creates me problems.

0 = 0.00 not .00

When it's null, then it's taking 0.00. But we do have some 0 values in our database and they aren't null.


thank you

leinadjan

Edited by: leinadjan on Feb 10, 2011 2:36 PM

Edited by: leinadjan on Feb 10, 2011 2:37 PM
This post has been answered by Solomon Yakobson on Feb 10 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 10 2011
Added on Feb 10 2011
4 comments
2,741 views