how i will retrive rows from object type
453745Apr 4 2006 — edited Apr 4 2006test is object type(varchar2,varchar2)
test1 is a object derived from test
test1(varchar2,varchar2,test);
how i will retrive rows from test1.
declare
type recf is ref cursor;
v_tab test1 := test1('a','b',test('c','d'));
rec recf;
begin
open rec for
select * from table(cast(v_tab as test1));
dbms_output.put_line('the rows are'||rec.test1.test11);
end;
when i compile this it return
ERROR at line 7:
ORA-06550: line 7, column 35:
PL/SQL: ORA-22907: invalid CAST to a type that is not a nested table or VARRAY
ORA-06550: line 7, column 1:
PL/SQL: SQL Statement ignored
ORA-06550: line 8, column 48:
PLS-00487: Invalid reference to variable 'REC'
ORA-06550: line 8, column 1:
PL/SQL: Statement ignored
error.