dbTalk Databases Forums  

Oracle 10g - Nested nested tables

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Oracle 10g - Nested nested tables in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
timoomit
 
Posts: n/a

Default Oracle 10g - Nested nested tables - 04-24-2006 , 04:32 AM






Hi!

I'm trying to create tables and either get ORA-22912 (column is not an
nested table) or when leaving out the 'NESTED TABLE' declaration
ORA-22913 (table name for nested table column has to be declared).
Below you can find one example for my object type definitions and a
part of the table declaration:

CREATE TYPE userRight_t AS OBJECT(
label VARCHAR2(20)
);

CREATE TYPE userRightTab_t AS TABLE OF userRight_t;

CREATE TYPE userRightManagement_t AS OBJECT(
employee REF employee_t,
userRights userRightTab_t
);

CREATE TYPE process_t AS OBJECT(
processID VARCHAR2(15),
....
userRights userRightManagement_t,
....
);

The table declaration:

CREATE TABLE Process OF process_t(
processID NOT NULL,
SCOPE FOR (processDepartment) IS Department,
SCOPE FOR (processOwner) IS Department
)
NESTED TABLE userRights STORE AS userRights_store (NESTED TABLE
userRights STORE AS userRights2_store),
....;

I don't know what is wrong about it.

Thanks

Timo


Reply With Quote
  #2  
Old   
DA Morgan
 
Posts: n/a

Default Re: Oracle 10g - Nested nested tables - 05-01-2006 , 04:33 PM






timoomit wrote:
Quote:
Hi!

I'm trying to create tables and either get ORA-22912 (column is not an
nested table) or when leaving out the 'NESTED TABLE' declaration
ORA-22913 (table name for nested table column has to be declared).
Below you can find one example for my object type definitions and a
part of the table declaration:

CREATE TYPE userRight_t AS OBJECT(
label VARCHAR2(20)
);

CREATE TYPE userRightTab_t AS TABLE OF userRight_t;

CREATE TYPE userRightManagement_t AS OBJECT(
employee REF employee_t,
userRights userRightTab_t
);

CREATE TYPE process_t AS OBJECT(
processID VARCHAR2(15),
...
userRights userRightManagement_t,
...
);

The table declaration:

CREATE TABLE Process OF process_t(
processID NOT NULL,
SCOPE FOR (processDepartment) IS Department,
SCOPE FOR (processOwner) IS Department
)
NESTED TABLE userRights STORE AS userRights_store (NESTED TABLE
userRights STORE AS userRights2_store),
...;

I don't know what is wrong about it.

Thanks

Timo
Rather than help you with creating a nested table, almost
always a bad idea, have you considered relational tables
supporting an object-relational view? It is what many Oracle
experts recommend.

The syntax with demos of both are available in Morgan's Library
at www.psoug.org.

Daniel Morgan
www.psoug.org


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.