Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Object type
Hello Sandeep
You must use alias in SQL statement for object table:
SQL> select a.c_add.street from customer a;
C_ADD.STREET
> Hi All,
>
> I created an object type and did as in following steps.
>
> CREATE TYPE Address_tp AS OBJECT (
> Street VARCHAR2(200),
> City VARCHAR2(200),
> State CHAR(2),
> Zip VARCHAR2(20)
> )
> /
> CREATE TABLE CUSTOMER
> (NO NUMBER,
> C_ADD Address_tp)
> /
> insert into customer values(1,address_tp('12','Falls
church','VA','22043'))
> /
> select no,c_add.street from customer
> /
>
> Last select statement gives invalid column error. What is wrong? I am
using
> 8.1.5 and Sqlplus 8.0.5.
>
> Help me
>
> Thanks
>
> Sandeep
> --
> Author: Sandeep Dubey
> INET: sandeep.dubey_at_induscorp.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
Received on Mon May 22 2000 - 22:09:53 CDT
![]() |
![]() |