Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> dereferencing nested objects
Hi,
I am quite new to object-relational databases. This is how the object Types look like:
CREATE OR REPLACE TYPE port_typ AS OBJECT(
device_id NUMBER,
portnummer NUMBER
);
CREATE OR REPLACE TYPE port_tab_typ AS OBJECT(
port port_typ,
gegenport REF port_tab_typ
);
I built an object table of type "port_tab_typ" and inserted some rows.
> Select port , DEREF(gegenport) from ports
behaves just as it should do I get:
PORT: DEREF(gegenport) PORT_TYP(33,1) PORT_TAB_TYP(PORT_TYP(30,2))
How can I use the device_id (30) of the object port_typ in Port_tab_typ for
e.g. a where-clause?
I want to get all rows that are referenced by gegenport AND have a device_id
of 30.
I hope i was able to explain it clear I not too familiar with this object stuff.
Thanks in advance
Thomas
Received on Mon Oct 08 2001 - 04:05:29 CDT