PL/SQL (MOSC)

MOSC Banner

ORA-01001: invalid cursor

edited May 22, 2012 11:38PM in PL/SQL (MOSC) 6 commentsAnswered

   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

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center