How to convert the varray to ref cursor
902424Nov 28 2011 — edited Nov 28 2011Hi,
Is there any way to convert varray to ref cursor....
i dont want to use any table or record as an ref cursor..
i just want to create a procedure which returns a ref cursor..
below is the sample procedure for it..
---------------------------------------------------------------------------------------------------
create or replace procedure FETCH_DATA1
(
tab_name in varchar2,
p_recordset1 OUT fetch_data_pak.ref_cursor
)
AS
type v_array1 is varray(1000) of t_transaction%rowtype;
v_array2 v_array1;
cursor s1 is select * from t_transaction where lastupdate_date > '08-Aug-09';
begin
open s1;
fetch s1 bulk collect into v_array2 limit 100;
close s1;
select * from table(cast (v_array2 as p_recordset1));
end FETCH_DATA1;
---------------------------------------------------------------------------------------------------
I need to convert the varray to ref cursor.....