Have a cursor. I needed to count the rows returned. I needed to check the condition of 0 rows. But even when there are rows being returned the rowcount zero condition is being met. Please see below..
FOR r_emp IN emp_cursor LOOP
........
END LOOP;
OPEN emp_cursor ;
IF (emp_cursor %ROWCOUNT = 0) THEN -- no rows found
END IF;
CLOSE emp_cursor ;
Appreciate any insights and ideas...