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 -> Q: Oracle8, cplx attributes

Q: Oracle8, cplx attributes

From: Wolfgang May <may_at_informatik.uni-freiburg.de>
Date: 1 Jul 1998 15:13:57 GMT
Message-ID: <6ndjnl$5fh$1@n.ruf.uni-freiburg.de>


Hi,

I have a problem with the syntax of accessing complex attributes in Oracle 8.0.3.0.0:

CREATE OR REPLACE TYPE GeoKoord AS OBJECT
(L NUMBER,

 B NUMBER);
/

CREATE TABLE City
(Name VARCHAR2(20),

 Pos GeoKoord);

INSERT INTO City VALUES ('Freiburg',GeoKoord(8,49));

... and the following query does not work
(complains about an invalid column name pos.B)

select pos.B from City;

but the following does the job:

select A.pos.B from City A;

Is this really necessary to give an alias in this situation (which is not necessary when using simple attributes) or is there something wrong with my syntax or the installation ?

THX Wolfgang

Received on Wed Jul 01 1998 - 10:13:57 CDT

Original text of this message

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