Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

MAKE_REF and ORA-22979

513508Jul 17 2007
Using the MAKE_REF function to create a REF to a row of an object table whose object identifier is primary key based, I continue to receive error ORA-22979. For example:

CREATE OR REPLACE TYPE child_menu_type AS OBJECT (
menu_option_id REF VAL_MENU_OPTIONS_TYPE)
FINAL INSTANTIABLE;
/

CREATE OR REPLACE TYPE child_menu_table_type AS TABLE OF child_menu_type;
/

CREATE OR REPLACE TYPE val_menu_assoc_type AS OBJECT (
menu_option_id NUMBER(4),
child_menus CHILD_MENU_TABLE_TYPE)
FINAL INSTANTIABLE;
/

CREATE TABLE val_menu_assoc OF val_menu_assoc_type (
CONSTRAINT xpk_vma PRIMARY KEY (menu_option_id))
OBJECT IDENTIFIER IS PRIMARY KEY
NESTED TABLE child_menus STORE AS child_menus_nt;

INSERT INTO val_menu_assoc VALUES
(0,
CHILD_MENU_TABLE_TYPE
(CHILD_MENU_TYPE
(MAKE_REF(val_menu_options,5)
)
)
);

According to the documentation, this should've worked. It did not. The error persists.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 14 2007
Added on Jul 17 2007
0 comments
107 views