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!

I want my select statement to return 0 if there is no data

979256Dec 11 2012 — edited Dec 11 2012
I want my select statement to return 0 if there is no data ..Example

a_amount NUMBER (14,4);

SELECT DECODE(A_AMOUNT,NULL,0,A_AMOUNT) AS AMOUNT
FROM emp

But the statement above does not return 0 if there is no data .. please help
'
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 8 2013
Added on Dec 11 2012
2 comments
1,648 views