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!

Problem with SET NUMFORMAT in sqlplus

894770Feb 14 2012 — edited Feb 14 2012
I have set the number format as below in sqlplus for format (17,2)

SET NUMFORMAT 99999999999999999.00

This is working perfectly when there are values other than zero. when zero is selected it is displaying as ".00".

I want this to be displayed as "0.00". How to do this

Also, the number of columns varies since the query is generated dynamiclly so i cant use "column format"
SQL> SET NUMFORMAT 99999999999999999.00
SQL> select 1234123534.00 from dual;

        1234123534.00                                                           
---------------------                                                           
        1234123534.00                                                           

SQL> select 0 from dual;

                    0                                                           
---------------------                                                           
                  .00                                                           

SQL> spool off
This post has been answered by BluShadow on Feb 14 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 13 2012
Added on Feb 14 2012
5 comments
7,393 views