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, 2 Apr 2003 21:41:41 +1000
Message-ID: <b6ei9k$4evrq$1@ID-110726.news.dfncis.de>

"andrewst" <member14183_at_dbforums.com> wrote in message news:2715945.1049214738_at_dbforums.com...
|
| Originally posted by Chris \
| > "Ed Prochak" wrote in message
| > news:3E847FFF.1060607_at_adelphia.net"]| > | 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 ?.
| >
| > A person told me during the week that it was not legal to use
| > '%TYPE' in this situation, and this is what I'm not sure about.
| >
| > Could this be the case ?.
| > irus Database: 263 - Release Date: 26/03/2003
|
| Yes. Anchoring (%TYPE) is a PL/SQL concept, whereas CREATE TYPE is SQL.
| You can't do that - same as you can't do:
|
| CREATE TABLE another_table
| ( fname MyTable.FirstName%TYPE,
| lname MyTable.LastName%TYPE,
| age MyTable.Age%TYPE
| );

Hello andrewst, and everyone else who responded. Thank you all for your help. It's nice to get this issue finally resolved in my mind, so now I can move forward.

Thanks again all.
Chris Val

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.465 / Virus Database: 263 - Release Date: 25/03/2003
Received on Wed Apr 02 2003 - 05:41:41 CST

Original text of this message

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