Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Abstract datatypes - HELP!!!
Hi
I'm using Oracle 8.0.5 Enterprise Edition with the Objects option installed (NT 4 platform).
I've created an abstract datatype as:
create type DT_ADDRESS as object
(street varchar2(20),
town varchar2(20),
city varchar2(20),
postcode varchar2(10));
This works okay and I can create a table using the abstract datatype as:
create table CUSTOMER (
id varchar2(6),
customer_name varchar2(20),
address dt_address);
I can insert data into the customer table :
insert into CUSTOMER values
(1234,'ACME','DT_ADDRESS('5 mystreet','mytown','mycity','mypostcvode');
When I select data from CUSTOMER this works
select * from CUSTOMER;
select address.* from customer;
But I cant select an individual column from the abstract datatype eg
select address.street from customer;
It always gives the error
ERROR at line 1:
ORA-00904: invalid column name
Can anyone explain whats happening here? Am I right in thinking that you CAN select an individual column from an abstract datatype?
Any help would be appreciated. Please reply to alistair.thomson_at_sphinxcst.co.uk
Thanks for the help.
Alistair Thomson
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Tue Jan 18 2000 - 03:27:52 CST
![]() |
![]() |