Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PLEAsE PLEASE HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
I changed the code to declare the type; the code compiles, but I am
still having difficulty testing. What is the correct syntax to test
this from the package?
The code is below:
CREATE OR REPLACE PACKAGE Api_job
AS
TYPE t_enroll_type IS
TABLE OF STUDENT%ROWTYPE
INDEX BY BINARY_INTEGER;
FUNCTION Students_Per_Enrolldate
(p_enroll ENROLLMENT.enroll_date%TYPE)
RETURN Api_job.t_enroll_type
AS
CURSOR c_studname IS
SELECT DISTINCT(e.student_id) student_id, s.first_name, s.last_name, e.enroll_date, ROWNUM
FROM STUDENT s, ENROLLMENT e WHERE s.student_id = e.student_id AND TO_DATE(e.enroll_date, 'DD-MON-YY') = p_enroll ORDER BY 1,2;