Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: ORACLE 9i , ERROR: PLS-00363 : expression 'SELF.ATTRIB_NUMBER' cannot be used as an assignment target

Re: ORACLE 9i , ERROR: PLS-00363 : expression 'SELF.ATTRIB_NUMBER' cannot be used as an assignment target

From: Sybrand Bakker <sybrandb_at_hccnet.nl>
Date: Sat, 17 Apr 2004 10:22:54 +0200
Message-ID: <77q180h417kivnlpot0qais92vd374nink@4ax.com>


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 DBA
Received on Sat Apr 17 2004 - 03:22:54 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US