Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

decode result

Status
Not open for further replies.

ang90

MIS
Aug 1, 2005
9
US

Hello,

I want to see '000.00' in a decode result. Can someone tell how to print it? I can print
999.99 but not 000.00. Its converting into 0.
 
Apply a format mask.
Code:
SQL> select decode(dummy,'X',0,1) result from dual;

    RESULT
----------
         0

SQL> select to_char(decode(dummy,'X',0,1),'099.99')  result from dual;

RESULT
-------
 000.00

SQL>

Beware of false knowledge; it is more dangerous than ignorance. ~George Bernard Shaw
Consultant Developer/Analyst Oracle, Forms, Reports & PL/SQL (Windows)
Author and Sole Proprietor of: Emu Products Plus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top