PL/SQL (MOSC)

MOSC Banner

Please Suggest : PL/SQL: ORA-00947: not enough values

edited May 16, 2012 11:48AM in PL/SQL (MOSC) 6 commentsAnswered ✓

Hello Experts,

    I am wriding small peice of Code which inserts the data from a Cursor variable into a table. I am stuck with the below error,

   10/6     PL/SQL: SQL Statement ignored
10/18    PL/SQL: ORA-00947: not enough values

   The Code is as below

     

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 LOOPINSERT INTO OBJ_INSERT VALUES(tab(J));END LOOP;END;

   Could you please suggest what is the flaw in the code that is causing this error. The table I created (Obj_insert) has enough columns as the data that my ref cursor is fetching from the package. I cross verified that by printing the refcursor by using PRINT RC;

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