ORA-01001: invalid cursor
Hello Experts,
I am trying to insert data into a table fetched from a cursor variable for some reporting purposes. I am using the below procedure to insert the data into the table.
CREATE OR REPLACE PROCEDURE INSERT_TEMP
IS
RC <PackageName>.RETURN_CURSOR;
TYPE tabobj IS TABLE OF OBJ_INSERT%ROWTYPE;
tab tabobj;
BEGIN
FETCH RC BULK COLLECT INTO tab;
CLOSE RC;
FOR J IN 1..tab.COUNT LOOP
INSERT INTO OBJ_INSERT VALUES tab(J);
END LOOP;
END;
This procedure is creating properly, However when I am trying to execute the procedure I am hitting the below error
SQL> BEGIN