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 -> how to get an attribute in an object table

how to get an attribute in an object table

From: Christian Uhrig <uhrig_at_mpi-sb.mpg.de>
Date: 2 May 1999 19:11:17 GMT
Message-ID: <7gi80l$1r0$1@hades.rz.uni-sb.de>


Hi all,

i'm an oracle beginner and
maybe the following question is stupid.

Let's say i have created an object table X.

i also have a table y where y has an attribute which is a reference to an object of X as an attribute.
Let's say the name of the attribute is A

i would like to get - using an sql statement - the content of an attribute z of the object referenced by A

Several textbooks (for instance the HOW TO book in chapter 16.3) claim that i can write (using the 'dot operator')

select A.z from y;

but that doesn't seem to work.

i can do

select deref(A) from y;

and i get the whole object.

Question 1: what is the correct syntax to get the attribute z of object A of table X for entries of table y.

Question 2: since A is a reference (a pointer) to an object i would like to ask queries like: which is the object o of object table X with 'A points to o'? I mean: select A from y gives me a long string but what does it exactly mean?

Please send me an email if you have an answer to one of these questions.

Thank you very much,

Christian Received on Sun May 02 1999 - 14:11:17 CDT

Original text of this message

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