Skip to Main Content

DevOps, CI/CD and Automation

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!

Is there a way to return 0 if count is null?

Dev. MusbahOct 8 2013 — edited Oct 8 2013

Hi All,

Suppose I have this query in a report:

Select count(emp_class)

from employees

where emp_class = 1

group by emp_class

Is there a way to make it returning the value of 0 if it returns null?

I tried this: Select nvl(count(emp_class, 0) but it doesn't work!

Note: I'm using Oracle DB 10g, Reports 6i

Thank you

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 5 2013
Added on Oct 8 2013
4 comments
1,805 views