Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Q: Oracle8, cplx attributes
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
![]() |
![]() |