How to copy a cursor variable?
Hallo,
I declared 2 cursors in my procedure, but I want to open only one at the time and do the same thing.
I do not want to use dynamic SQL (ref cursor and query string). In the real procedure it's better to use static SQL.
This code (THAT DOESN'T WORK) explain better my intentions:
DECLARE
--TYPE T_Conrad IS REF CURSOR;
C_Conrad SYS_REFCURSOR;
L_Purpose VARCHAR2 (25);
CURSOR C_Phone
IS
SELECT 'TELEPHONE' FROM DUAL;
CURSOR C_Fax
IS
SELECT 'FAX' FROM DUAL;
BEGIN
FOR I IN 1 .. 2
LOOP
IF I = 1
THEN
C_Conrad := C_Phone;
ELSIF I = 2
THEN
C_Conrad := C_Fax;
0