Hi ,
I have created a procedure to return multiple record set but I am unable to execute it. Can any one help me with this.
I get the error when executing this procedure saying that variable 'CURSOR ' must be declared.
Here is and example code:
CREATE OR REPLACE package reftest as
cursor c1 is select ename from emp;
type empCur is ref cursor return c1%ROWTYPE;
Procedure GetEmpData(en in varchar2,EmpCursor in out empCur);
END;
CREATE OR REPLACE package body reftest as
Procedure GetEmpData
(en in varchar2,EmpCursor in out empCur) is
begin
open EmpCursor for select ename from emp where ename
LIKE en;
end;
end;
I have created a procedure to return multiple record set but I am unable to execute it. Can any one help me with this.
I get the error when executing this procedure saying that variable 'CURSOR ' must be declared.
Here is and example code:
CREATE OR REPLACE package reftest as
cursor c1 is select ename from emp;
type empCur is ref cursor return c1%ROWTYPE;
Procedure GetEmpData(en in varchar2,EmpCursor in out empCur);
END;
CREATE OR REPLACE package body reftest as
Procedure GetEmpData
(en in varchar2,EmpCursor in out empCur) is
begin
open EmpCursor for select ename from emp where ename
LIKE en;
end;
end;