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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Oracle Nested Object question (varray)

Re: Oracle Nested Object question (varray)

From: Thomas J. Kyte <tkyte_at_us.oracle.com>
Date: 2000/07/01
Message-ID: <8jkrhq$1vu$1@nnrp1.deja.com>#1/1

In article <395CC1B2.480F291D_at_hotmail.com>,   John Wright <gtaurine_at_hotmail.com> wrote:
> I have to create some objects in oracle 8i
> I am wondering if REF can be used with VARRAY
>
> suppose I have:
> create type ALIAS_VA as varray(10) of VARCHAR2(20);
>
> create type ADDRESS_TY as object
> ( Street VARCHAR2(20),
> City VARCHAR2(20));
>
> create type PERSON as object
> ( Name VARCHAR2(20),
> Alias ALIAS_VA,
> Address ADDRESS_TY));

                              ^^^ one too many parens...

create type ALIAS_VA as varray(10) of VARCHAR2(20); /

create type ADDRESS_TY as object
( Street VARCHAR2(20),
  City VARCHAR2(20));
/

create type PERSON as object

( Name           VARCHAR2(20),
  Alias             ALIAS_VA,
  Address        ADDRESS_TY);

/

works just find (gotta use the / as well since TYPES can have ';' in them, sqlplus won't run then until you have the command separator character....

>
 

> SQL*PLUS told me "Type created with compilation errors"
>
> I put REF before ALIAS_VA, it didn't help neither.
>
> Is there anything else I can do?
>
> Thanks a lot!
>
> John
>
>

--
Thomas Kyte (tkyte_at_us.oracle.com) Oracle Service Industries
Howtos and such: http://osi.oracle.com/~tkyte/index.html
Oracle Magazine: http://www.oracle.com/oramag
Opinions are mine and do not necessarily reflect those of Oracle Corp


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Sat Jul 01 2000 - 00:00:00 CDT

Original text of this message

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