http://www.oracle.com/technetwork/issue-archive/2008/08-mar/o28plsql-095155.html
In this page they have mentioned that:
When you are using BULK COLLECT and collections to fetch data from your cursor, you should never rely on the cursor attributes to decide whether to terminate your loop and data processing.
He mentions that, to make sure that our query processes all the rows, we should
NOT USE:
EXIT WHEN
cursor%NOTFOUND;
and we SHOULD USE:
EXIT WHEN
collectionvariable.count=0;
What is the reason?