Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle 10g - Nested nested tables
timoomit wrote:
> 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
Received on Mon May 01 2006 - 16:33:43 CDT
![]() |
![]() |