Change value of variable in object type
629759Aug 24 2010 — edited Aug 25 2010Hi to all!
I created an object using:
CREATE OR REPLACE TYPE some_object AS OBJECT
(
some_information NUMBER,
MEMBER FUNCTION some_function RETURN NUMBER
)
and when I tried to implement member function "some_function" that need to change value of variable "some_information" like:
CREATE OR REPLACE TYPE BODY some_object AS
MEMBER FUNCTION some_function RETURN NUMBER IS
BEGIN
some_information := some_information + 5;
RETURN some_information;
END;
END;
It gives me following error:
Compilation errors for TYPE BODY CMS.SOME_OBJECT
Error: PLS-00363: expression 'SELF.SOME_INFORMATION' cannot be used as an assignment target
Line: 5
Text: some_information := some_information + 5;
The question is:
How to implement my function that can change value of "some_information" ?