Jump to content

NVL(COUNT(*),0)


rbragg

Recommended Posts

In the following query, why would RECORD_COUNT still give me a null value instead of 0 if the db was empty?

 

<?php
$queryContract = "
SELECT action_num, status, NVL(COUNT(*),0) AS RECORD_COUNT
FROM schema.HEC_ACTION 
WHERE schema.HEC_ACTION.contract_num = '" . $_SESSION['contract'] . "'
AND schema.HEC_ACTION.step_num = '" . $thisStep . "'
GROUP BY action_num, status
ORDER BY action_num, status";
?>

Link to comment
https://forums.phpfreaks.com/topic/78290-nvlcount0/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.