Is there any special reason, why REF CURSOR can be opened multiple times and normal cursors not (see example below)?
TYPE type_cur IS REF CURSOR;
SELECT ‘a’ AS surname FROM DUAL;
/* example 1 - open ref cursor twice */
OPEN cur1 FOR SELECT NULL AS city FROM DUAL;
OPEN cur1 FOR SELECT ‘Munich’ AS city FROM DUAL; /* <= no exception here */
/* example 2 - open noraml cursor twice */
OPEN cur2; /* <= ORA-06511: PL/SQL: cursor already open */
CodeXpert reports me “Cursor - Avoid opening cursors that are already open” for that. I am using Toad 220.127.116.11.
Can anyone tell me if the above described problem still occurs the newest version (11.0) by using the provided code example?
Thank you for your help …