I created a test pkg and a pkg body which will be called by
Crystal Reports.
CREATE OR REPLACE PACKAGE epi IS
TYPE wafer_record IS RECORD (
containerid container.containerid%TYPE,
containername container.containername%TYPE
);
TYPE Test_Type IS REF CURSOR RETURN wafer_record;
PROCEDURE epi_wafer(wafer_cursor IN OUT Test_Type);
END epi;
/
show errors;
CREATE OR REPLACE PACKAGE BODY epi IS
PROCEDURE epi_wafer(wafer_cursor IN OUT Test_Type)
IS
BEGIN
OPEN wafer_cursor FOR
SELECT containerid,containername
FROM container
ORDER BY containername;
END epi_wafer;
END epi;
/
show errors;
Both are compiled without error. How do I run it thru SQL*Plus? I
tried
SQL> exec epi.epi_wafer;
But got error
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to
'EPI_WAFER'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
What parameter I need to pass to epi_wafer? Thanks! I also got the
same error when I called this Stored Procedure from Cyrstal Report.