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 -> Difference between view and subquery using user-defined types

Difference between view and subquery using user-defined types

From: Carsten Reinhard <reinhard_at_informatik.uni-hannover.de>
Date: Thu, 09 Sep 1999 16:36:34 +0200
Message-ID: <37D7C5F2.B5721EBE@informatik.uni-hannover.de>


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);
Received on Thu Sep 09 1999 - 09:36:34 CDT

Original text of this message

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