| Oracle 10g - Nested nested tables [message #168933] |
Mon, 24 April 2006 04:36  |
timoomit
Messages: 5 Registered: April 2006
|
Junior Member |
|
|
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
|
|
|
|
|
|
| Re: Oracle 10g - Nested nested tables [message #169133 is a reply to message #168933] |
Tue, 25 April 2006 04:32   |
timoomit
Messages: 5 Registered: April 2006
|
Junior Member |
|
|
Hi!
Thank you very much for your reply! I adapted my statements and it works in some cases, but for most of them I get:
ORA-02337 not an object type column
Cause: An attempt was made to use dotted notation on a non-ADT column; that is, "a.b.c" where "a" is not an object type.
Action: Either change the column type to an object type or do not perform this operation.
Does anyone have any idea about this? It seems to me that the problem is that the attribute 'userRights2' in object type 'process_t' doesn't meet the requirements.
Timo
|
|
|
|
| Re: Oracle 10g - Nested nested tables [message #169158 is a reply to message #168933] |
Tue, 25 April 2006 06:57  |
timoomit
Messages: 5 Registered: April 2006
|
Junior Member |
|
|
UPDATE:
I found out how to do it. I just had to mix the '.' notation with the 'NESTED TABLE ...(NESTED TABLE ...)' notation in some places. For example:
NESTED TABLE output STORE AS output_store (NESTED TABLE data STORE AS outputdata_store, NESTED TABLE prerequisite STORE AS outputPrereq_store, NESTED TABLE pProcedure.prerequisites STORE AS procPrereq2_store)
Thank you again for your help!
Regards,
Timo
|
|
|
|