Re: Object features of Oracle8
Date: Wed, 15 Sep 1999 14:59:13 -0400
Message-ID: <aOzfNz4N2aU+r01FqmcDNbUrs32y_at_4ax.com>
A copy of this was sent to burkeblackman_at_my-deja.com (if that email address didn't require changing) On Wed, 15 Sep 1999 18:10:02 GMT, you wrote:
>Hello, I am trying to get the following to work:
>(this is straight out of ORACLE8: The Complete Reference)
>the types and table are defined as follows:
>SQL> desc address_ty -- this is the 1st type
> Name Null? Type
> ------------------------------- -------- ----
> STREET VARCHAR2(20)
> CITY VARCHAR2(20)
> STATE VARCHAR2(2)
> ZIP NUMBER
>
>SQL> desc person_ty -- this is the 2nd type
> Name Null? Type
> ------------------------------- -------- ----
> NAME VARCHAR2(20)
> ADDRESS ADDRESS_TY
>
>SQL> desc customer -- this is a table based upon those types
> Name Null? Type
> ------------------------------- -------- ----
> CUSTOMER_ID NUMBER
> PERSON PERSON_TY
>
>select person.name,
> person.address.state
>from customer;
>
>I get the following error when I do this in SQL*PLUS.
>
>select person.address.state from customer
> *
>ERROR at line 1:
>ORA-00904: invalid column name
>
Needs a correlation name:
tkyte_at_8.0> select c.person.name, c.person.address.state from customer c;
no rows selected
>I have no problem inserting into the table, or selecting * from the
>table. But when I try to select just a single type-based column I get
>that error. This is how they do it in the book, I don't know what I'm
>doing wrong. Any help would be appreciated!
>
>Burke
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.
-- See http://govt.us.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st Thomas Kyte tkyte_at_us.oracle.com Oracle Service Industries Reston, VA USA Opinions are mine and do not necessarily reflect those of Oracle CorporationReceived on Wed Sep 15 1999 - 20:59:13 CEST