Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> object, invalid column name, Weird!
I created type address_ty, person_ty like this (all the examples are
from George Koch's book ORacle 8: the complete Reference)
create type address_ty as object
(Street varchar2(50),
city varchar2(25),
State Char(2),
Zip NUMBER);
create type person_ty as object
(Name varchar2(25),
Address Address_ty);
then I created a table customer
create table customer
(Customer_ID NUMBER,
Person Person_TY);
then I inserted a row into the table
insert into customer values
(1, person_ty('Neil Mullane', Address_ty('57 MT ST', 'FINN', 'NH',
1234)));
then I select * from customer, the data is there. all the above statement are successful.
But when I select the object's attribute, I always got invalid column
name. Like this statement:
select Person.Name from Customer;
select Person.Address.Street from customer;
Why these so straightforward statement won't work? Anybody got any idea?
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Feb 10 2000 - 11:53:34 CST
![]() |
![]() |