Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Abstract datatypes - HELP!!!

Abstract datatypes - HELP!!!

From: <alistair.thomson_at_sphinxcst.co.uk>
Date: Tue, 18 Jan 2000 09:27:52 GMT
Message-ID: <861bmh$r0o$1@nnrp1.deja.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US