Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> PL/SQL error

PL/SQL error

From: Morten <c960901_at_aix5.kbar.dtu.dk>
Date: Fri, 2 Jul 1999 14:55:47 +0200
Message-ID: <Pine.A41.3.95.990702145356.16158A-100000@aix5.kbar.dtu.dk>

Hi, I just made my first PL/SQL code. When I try to run it I get the following error

ERROR at line 13:

ORA-06550: line 13, column 9:
PLS-00201: identifier 'V_DOCTABLE' must be declared
ORA-06550: line 11, column 4:

PL/SQL: SQL Statement ignored

As you can see in the code below, v_docTable is declared (as far as I can tell), who doesn't the compiler agree?

Thanks

Morten

DECLARE
  v_docTable VARCHAR(32);

CURSOR c_docTypeCursor IS
  SELECT table_name
  FROM doc_type;

BEGIN
  FOR v_docTable IN c_docTypeCursor
  LOOP

  	INSERT INTO document (id, type)
        SELECT v_docTable.id, doc_type.id
	FROM   v_docTable, doc_type
        WHERE  doc_type.table_name = v_docTable;
  END LOOP;
  CLOSE c_docTypeCursor;
  COMMIT;
END; Received on Fri Jul 02 1999 - 07:55:47 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US