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 -> Trouble creating object table

Trouble creating object table

From: David <auto90059_at_hushmail.com>
Date: Sun, 12 Oct 2003 17:08:37 +1000
Message-ID: <3f88fe89$0$29372$afc38c87@news.optusnet.com.au>


I'm having trouble creating an object table in oracle 9i..

I have the following types declared:

CREATE TYPE luxury_varraytype AS VARRAY(3) OF VARCHAR2(15);
/

CREATE OR REPLACE TYPE guest_type AS OBJECT (  GuestId NUMBER(4),
 Firstname VARCHAR2(10),
 Surname VARCHAR2(10)
 );
/

CREATE TYPE specialOption_type AS OBJECT (  OptDesc VARCHAR2(15),
 quantity NUMBER(4)
 );
/

CREATE TYPE specialOption_ntabtype AS TABLE OF specialOption_type;
/

CREATE TYPE specialDeal_type AS OBJECT ( bookingNo NUMBER(4),
specialOption_ntab specialOption_ntabtype, luxury_varray luxury_varraytype,
guest REF guest_type
);
/

I now want create an object table of specialDeal_types and this doesn't work

CREATE TABLE specialDeal_Table of specialDeal_type  PRIMARY KEY (bookingNo),
 OBJECT IDENTIFIER IS PRIMARY KEY
 NESTED TABLE specialOption_ntab STORE AS specialOption_store_ntab;

Could someone show the correct syntax for this?

Cheers,

David Received on Sun Oct 12 2003 - 02:08:37 CDT

Original text of this message

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