Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Trouble with user-defined types
The setup: I'm fairly new to Oracle and such, so please bear with me :) I'm learning about objects at the moment, following some examples from the Oracle 8 Complete Reference. The examples from the book don't work either, but for the sake of brevity I'll show you the stuff I made myself
create type CONTACT_TY as object (
Name VARCHAR2(30),
Email VARCHAR2(30));
/
then:
create table MY_TABLE (Contact CONTACT_TY);
then:
insert into MY_TABLE values (CONTACT_TY('John','jsmith_at_unix.sprint.net'));
Now, I describe the table and look at the types attributes from the data dictionary, and all looks ok. When I try to get at the data though....
select Contact.Name from MY_TABLE;
I get this error:
ERROR at line 1:
ORA-00904: invalid column name
..with a star sitting directly below the N in Name. What am I doing wrong? This is on version 8.1.5 on Solaris. Received on Tue Jul 18 2000 - 00:00:00 CDT
![]() |
![]() |