Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Difference between view and subquery using user-defined types

0 views
Skip to first unread message

Carsten Reinhard

unread,
Sep 9, 1999, 3:00:00 AM9/9/99
to
Hi,

we are having trouble querying views using user-defined types (Oracle
8+8i on Solaris). A select on a view works while the same select on the
corresponding subquery results in ORA-00904.

We use the following defintion:

create or replace view ev as (select e1.o1.obj_method() as obj from
e01 e1);

In this
select e2.obj.obj_method() from ev e2;
works, while
select e2.obj.obj_method() from (select e1.o1.obj_method() as obj from
e01 e1) e2;
results in the above error message.

Has anyone any experience/solution for this problem ??

All necessary definitions for the example to run are appended below.

Carsten Reinhard,
University of Hannover, Department of Mathematics and Computer Science.


create type obj_type as object (
i number,
j number,
member function obj_method return obj_type,
pragma restrict_references (obj_method, RNDS, WNDS, RNPS, WNPS)
);
/

create or replace type body obj_type as
member function obj_method return obj_type
is begin
return NULL;
end;
end;
/

create table e01 (
o1 obj_type,
o2 obj_type);

0 new messages