Consultor Eletrônico



Kbase P16800: Do we support nested tables in Oracle?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   1/30/2003
Status: Unverified

GOAL:

Do we support nested tables in Oracle?

FACT(s) (Environment):

Progress 8.x

FACT(s) (Environment):

Progress 9.x

FACT(s) (Environment):

Oracle 8.x

FIX:

Nested tables is a collection type in Oracle 8i. A collection is an ordered group of elements of the same type. Each element from the group can be accessed using a unique subscript.

Following is an example of nested table:

Create or replace type ANIMAL_TY as object
(Breed VARCHAR2(25),
Name VARCHAR2(25),
Birthdate DATE);

Create type ANIMALS_NT as table of ANIMAL_TY;

Create table BREEDER
(BreederName VARCHAR2(25),
Animals ANIMALS_NT)
nested table ANIMALS store as ANIMALS_NT_TAB;

Then - here is an example of how to insert data into the table.

Insert into BREEDER values
('JANE JAMES',
ANIMALS_NT(
ANIMAL_TY('DOG', 'BUTCH', '31-MAR-97'),
ANIMAL_TY('DOG', 'ROVER', '05-JUN-97'),
ANIMAL_TY('DOG', 'JULIO', '10-JUN-97')
));

Progress Oracle dataserver does not support nested tables in Oracle, to support it requires extensive data dictionary & dataserver changes. When you have nested tables in Oracle database, please do not include these objects during schema pull, pulling nested tables could result in core dump.