Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Object Type Error
Hi everyone.
I'm not sure if this is allowed, but here is what I'm trying to do.
I can create an object type like so:
CREATE OR REPLACE TYPE MyType AS OBJECT
(
fname VARCHAR2( 30 ),
lname VARCHAR2( 30 ),
age NUMBER( 3 )
);
But when I try to create it using the '%TYPE', I get the error listed below(after typing show errors), but I'm not sure why.
CREATE OR REPLACE TYPE MyType AS OBJECT
(
fname MyTable.FirstName%TYPE, lname MyTable.LastName%TYPE, age MyTable.Age%TYPE
Errors for TYPE MYTYPE:
LINE/COL ERROR
-------- ---------------------------------------------------------- 0/0 PL/SQL: Compilation unit analysis terminated 3/9 PLS-00201: identifier 'MYTABLE.FIRSTNAME' must be declared
Can someone advise as to why I can't do this please ?.
Thanks.
Chris Val
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.454 / Virus Database: 253 - Release Date: 10/02/2003Received on Sun Mar 23 2003 - 04:12:22 CST
![]() |
![]() |