Is it right to pass a Cursor to a (REFERRNECE CURSOR) P_CURSOR OUT pkg_t.SPCUR Package spec like I am doing in the Procedure. When I execute the procedure, I pass in the one parameters as follows: exec sp_emp_request(‘Smith’) to get a cursor back in the Package.
But when executed, it keeps generating the following error:
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'SP_EMP_REQUEST'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Is there some other thing that I have to do for the Procedure to execute successfully?
CREATE OR REPLACE package pkg_t
AS
TYPE spcur IS REF CURSOR;
END pkg_t;
/
CREATE OR REPLACE PROCEDURE sp_emp_request
(Ename IN VARCHAR2,
P_CURSOR OUT PKG_T.SPCUR )
AS
BEGIN
OPEN P_CURSOR FOR
SELECT * FROM EMP;
Bookmarks