Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQLJ calling stored procedure with cursor?

Status
Not open for further replies.

slok

Programmer
Jul 2, 1999
108
0
0
SG
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?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top