Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PLS-00320???
hello,
The problem looks to be a name scoping problem with the parser i.e.
the first 'team' it finds is the field it is trying to define! Most
odd.
If you put the schema name as part of the type declaration it works
fine. e.g
type team_rec_type is record (
team scott.team.name%type
);
Version 7.2 Oracle on OS/2.
graham (aka grumpy).
lame_at_clark.net () ....
#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
Graham Miller ...
Opinions expressed are mine, they are free, and worth exactly what they cost.
Received on Wed Apr 16 1997 - 00:00:00 CDT
![]() |
![]() |