Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: ORACLE 9i , ERROR: PLS-00363 : expression 'SELF.ATTRIB_NUMBER' cannot be used as an assignment target
On 16 Apr 2004 15:15:47 -0700, victorveloso_at_email.com (Victor) wrote:
>Trying to compile an object in Oracle 9i.
>Why is this throwing an exception?
>Does anyone have a clue? Or all of you as puzzled as me? Any experts?
>
>Throws error:
>PLS-00363: expression 'SELF.ATTRIB_NUMBER' cannot be used as an assignment target
>
>==========
>CREATE OR REPLACE TYPE TEST_OBJECT AS OBJECT
>(
> ATTRIB_NUMBER NUMBER,
> MEMBER FUNCTION TEST_FUNCTION RETURN NUMBER
>)
>/
>CREATE OR REPLACE TYPE BODY TEST_OBJECT AS
> MEMBER FUNCTION TEST_FUNCTION RETURN NUMBER IS
> BEGIN
> ATTRIB_NUMBER := ATTRIB_NUMBER + 1;
> RETURN ATTRIB_NUMBER;
> END;
>END;
>/
>==========
>
>Any help would be greatly appreciated.
Instead of shouting, *read* the message in the error messages manual and try to *understand* it: it tells you, you can't assign into that variable.
-- Sybrand Bakker, Senior Oracle DBAReceived on Sat Apr 17 2004 - 03:22:54 CDT