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

Home -> Community -> Usenet -> c.d.o.server -> Oracle8 Object Tables and Nested Tables

Oracle8 Object Tables and Nested Tables

From: <phoekstra_at_my-dejanews.com>
Date: Tue, 15 Sep 1998 15:31:15 GMT
Message-ID: <6tm183$5ak$1@nnrp1.dejanews.com>


Greet the sun,

Essentially, the question boils down to: How do you create collections of collections within Oracle8?

Example (simple illustration of what I want to do):

CREATE OR REPLACE TYPE phone_typ AS OBJECT (

   phone_loc           VARCHAR2(35),
   phone_nbr           VARCHAR2(15)

);

CREATE TYPE phone_list_ntab AS TABLE OF phone_typ;

Now I have a nested table of phone numbers.

I could create a person table with a NESTED TABLE within it and everything would be fine. However, I don't want person to be a basic table, but an object table that is part of a greater table.

CREATE OR REPLACE TYPE person_typ AS OBJECT (

   name                VARCHAR2(254),
   phone_list          phone_list_ntab)

When I try to create a table of person objects or department objects with a collection of person objects, Oracle tells me:

LINE/COL ERROR

-------- -----------------------------------------------------------------
0/0      PL/SQL: Compilation unit analysis terminated
1/28     PLS-00534: A Table type may not contain a nested table type or
         VARRAY.

So am I struck with relational tables that have the ability to contain a single level collection?

Perry Hoekstra
dutchman_at_mn.uswest.net

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Tue Sep 15 1998 - 10:31:15 CDT

Original text of this message

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