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 -> Re: Object Type Error

Re: Object Type Error

From: Chris \( Val \) <chrisval_at_bigpond.com.au>
Date: Wed, 26 Mar 2003 23:59:55 +1100
Message-ID: <b5s88d$29hhtt$1@ID-110726.news.dfncis.de>

"Chris ( Val )" <chrisval_at_bigpond.com.au> wrote in message news:b5k1a4$29c3fl$1_at_ID-110726.news.dfncis.de...
| 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 ?.

Anyone out there ?.

Cheers.
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/2003
Received on Wed Mar 26 2003 - 06:59:55 CST

Original text of this message

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