Home » SQL & PL/SQL » SQL & PL/SQL » Error while using ANYDATA through VARRAY
Error while using ANYDATA through VARRAY [message #385585] Tue, 10 February 2009 03:20
Tomarenz
Messages: 9
Registered: January 2009
Junior Member
Hi, this simple sequence, aiming to create an array of named untyped data:

CREATE TYPE NV_type AS OBJECT (
name VARCHAR2(40),
type SYS.ANYDATA
);
/
CREATE TYPE NV_array AS VARRAY(20) OF NV_type;
/
CREATE TYPE P_type AS OBJECT ( modifiers NV_array );
/
CREATE TABLE P_table OF P_type;

fails. Table creation raises ORA-22370: "incorrect usage of method embedded AnyData in VARRAY column".
It says also that "method SYS.AnyData is being used inappropriately" - can't figure out why.

It seems that combining AnyData together with VARRAY requires some special treatment, but I could not find any Oracle documentation about this nor I could find any example dealing with this pattern.
The same error is thrown even for simple usage of NV_array type in any relational table field.
Any help is appreciated.
Previous Topic: how to compare data with other child data (merged)
Next Topic: getting row from both transaction tables
Goto Forum:
  


Current Time: Sat Dec 10 05:06:36 CST 2016

Total time taken to generate the page: 0.07412 seconds