Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> PLS-00320???
Hi everyone.
I received the PLS-00320: the declaration of the type of this expression is
incomplete or malformed
error and eventually isolated the problem, but I don't understand *why* the
code in question should be generating this error at all. Here's the
illegal construction.
#####################################################################
SQL> l
1 create or replace package lead_rec_types as
2 type team_rec_type is record (team team.name%type);
3* end lead_rec_types;
SQL> /
Warning: Package created with compilation errors.
SQL> show errors
Errors for PACKAGE LEAD_REC_TYPES:
LINE/COL ERROR
-------- ------------------------------------------------------------ 2/1 PL/SQL: Declaration ignored 2/36 PLS-00320: the declaration of the type of this expression is incomplete or malformed
#####################################################################
I can fix the problem by changing the record field name "team" to any other non-reserved word. For instance.
#####################################################################
SQL> c/team /org /
2* type team_rec_type is record (org team.name%type);
SQL> l
1 create or replace package lead_rec_types as
2 type team_rec_type is record (org team.name%type);
3* end lead_rec_types;
SQL> /
Package created.
#####################################################################
Note that "org" is also a valid table name in my database so the problem is not because I've used a table name as a record field name. The problem seems to be that I've confused the parser by writing "team team.name%type".
I've checked the documentation but perhaps I'm missing something obvious. Any thoughts/ridicule are welcome. :-)
Later,
John
Received on Thu Mar 13 1997 - 00:00:00 CST