title: Failure in Oracle Stored Procedure
body: <p>There is an issue with my stored procedure.
  It fails in the below case</p>
  
  <pre><code>cntmismatch NUMBER;
  
  SELECT COUNT(keyvalue) INTO cntmismatch 
  FROM tbl_temp GROUP BY keyvalue HAVING count(keyvalue) &gt; 1
  </code></pre>
  
  <p>When there is no data for the above criteria , it fails</p>
  
  <p>I even tried using </p>
  
  <pre><code>SELECT NVL(COUNT(keyvalue),0) INTO cntmismatch 
  FROM tbl_temp GROUP BY keyvalue HAVING count(keyvalue) &gt; 1
  </code></pre>
  
  <p>But still it retuns me null here and proc fails</p>