Using a user defined type as a function return type with in an object type
705666May 18 2010 — edited May 21 2010Hi I have created my own table data type that I want to use as the return data type for a member function of an object type I have created.
I am working in a 10g environment.
The code I have used looks something like this:
create or replace
package p as
type p_rec is record(v1 number);
type p_tab is table of p_rec;
end p;
/
CREATE OR REPLACE TYPE p_ot AS OBJECT (
/* some declarations*/
NOT FINAL MEMBER FUNCTION foo RETURN p.p_tab
);
/
When I try to compile p_ot I get an error: Error(5,40): PLS-00201: identifier 'P.P_TAB' must be declared.
I'm sure all the syntax is correct so I must be missing something, amy hepl would be great.
Cheers