Subject SUM function returns NULL if no Records, Need it to return 0
Author Anthony Tanas
Hi,

I have a query where I am using a HAVING clause, such as:

HAVING
SUM(AMOUNT) > 0

But the problem is if there are no records tabulated in the aggregate
function the function returns NULL. This prevents records from being
fetched. I need it to return 0. What should I do?

Thanks.