Home » SQL & PL/SQL » SQL & PL/SQL » pls-00320 error
pls-00320 error [message #48082] Fri, 15 October 2004 13:31 Go to next message
Parth
Messages: 20
Registered: April 2004
Junior Member
i get error at this cursor when i compile my proc


cursor cursor_insert is

select process_status,organization_code,plan_name,r2.emp_cd,r2.emp_nm,r2.docomo_date,r2.project_cd,r2.job_cd,r2.hours

from qa_result_initial r1 , dump_tran_initial r2

where r1.emp_cd = r2.emp_cd and

r1.docomo_date = r2.docomo_date and

to_char(r2.docomo_date,'MON-YYYY') = myear;


 

 
Re: pls-00320 error [message #48085 is a reply to message #48082] Fri, 15 October 2004 22:00 Go to previous message
Barbara Boehmer
Messages: 7977
Registered: November 2002
Location: California, USA
Senior Member
The following is an excerpt from Oracle online documentation. If this does not help, then post your whole code.

PLS-00320 the declaration of the type of this expression is incomplete or malformed

Cause: In a declaration, the name of a variable or cursor is misspelled or the declaration makes a forward reference. Forward references are not allowed in PL/SQL. A variable or cursor must be declared before it is referenced it in other statements, including other declarative statements. For example, the following declaration of dept_rec raises this exception because it refers to a cursor not yet declared:

DECLARE
dept_rec dept_cur%ROWTYPE;
CURSOR dept_cur IS SELECT ...
...

Action: Check the spelling of all identifiers in the declaration. If necessary, move the declaration so that it makes no forward references.
Previous Topic: UTL_FILE_DIR
Next Topic: PL/SQL procedure logging
Goto Forum:
  


Current Time: Sun Sep 14 23:47:13 CDT 2014

Total time taken to generate the page: 0.10111 seconds