you may try this( works with scott schema)
Create or replace Procedure Test_RefCurosr(Pemp_Id number,Pout IN OUT
sys_refcursor)
as
V_query varchar2(2000);
Begin
V_query:='select * from emp where EMPNO='||Pemp_ID;
Open Pout for
V_query;
End;
/
Variable x refcursor;
exec Test_RefCurosr(7369,:x);
Print X;
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en
-~----------~----~----~----~------~----~------~--~---