DB Version:Oracle9i Enterprise Edition Release 9.2.0.4.0
I am trying to find a way to initialize a varray with values.
PHP Code:
DECLARE
TYPE r IS RECORD (err_no NUMBER,err_message VARCHAR2(255));
TYPE T IS VARRAY(10) OF r ;
TYPE T1 IS VARRAY(10) OF VARCHAR2(10);
e_t T := T(r(1,'a'),r(2,'b')); --This doesnt work
e1 T1 := T1('a','b'); --This works
BEGIN
dbms_output.put_line(e1(1));
END;
When the varray is of a single column type then I am able to initialize values to it.
But when it is of a record type then it blows up.
(This will work if I create it as a object and table type in the database).
Is there any way to make this work using varrays?