I have a stored procedure as follows:
===
Procedure Count_Offences (
p_sdate IN date,
p_edate IN date,
p_off_cur IN OUT OffencesCurTyp)
AS
BEGIN
OPEN p_off_cur FOR SELECT DEMERIT_CODE, count(*)
FROM offence
WHERE off_datetime between to_date(p_sdate, 'YYYY-MM-DD')
AND to_date(p_edate, 'YYYY-MM-DD')
GROUP BY demerit_code;
END Count_Offences;
====
From my sqlj file, how can I declare a "cursor" to handle
the return data from the stored procedure?
===
Procedure Count_Offences (
p_sdate IN date,
p_edate IN date,
p_off_cur IN OUT OffencesCurTyp)
AS
BEGIN
OPEN p_off_cur FOR SELECT DEMERIT_CODE, count(*)
FROM offence
WHERE off_datetime between to_date(p_sdate, 'YYYY-MM-DD')
AND to_date(p_edate, 'YYYY-MM-DD')
GROUP BY demerit_code;
END Count_Offences;
====
From my sqlj file, how can I declare a "cursor" to handle
the return data from the stored procedure?