Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: dereferencing nested objects

Re: dereferencing nested objects

From: Thomas Ruschival <t.ruschival_at_vivid-md.de>
Date: Mon, 8 Oct 2001 11:20:19 +0200
Message-ID: <9prqq8$k5rsp$1@ID-37256.news.dfncis.de>


all right now!

It works just as it did on Friday I forgot to use an alias for the table with the real tablename it doesn´t work! You have to say something like:
SELECT port1.gegenport.port.device_id
FROM ports port1
WHERE port1.port.device_id=32

have Fun with Oracle!
thomas

"Thomas Ruschival" <t.ruschival_at_vivid-md.de> schrieb im Newsbeitrag news:9prpun$kb6ul$1_at_ID-37256.news.dfncis.de...
> 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:20:19 CDT

Original text of this message

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