Cursor for loop going in to the loop even when the query does not return any rows
We recently upgraded to Oracle Database Standard Edition 10.2.0.5.0. But we are now experiencing a weird situation here.
We have a pl/sql package -> cursor_pkg
- inside we have a cursor -> c1
Then there is another pl/sql package -> caller_pkg
In the cursor_pkg there is a publicly declared parameterized cursor which is being accessed from the cursor_pkg and caller_pkg through two procedures. Both procedures accessing the cursor in a cursor for loop. The first procedure (in cursor_pkg) works fine. But the second procedure goes into the loop even though the sql does not fetch any rows.