Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> PL/SQL error
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:
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;
![]() |
![]() |