I have a question about this procedure. What I am trying to do is to pass in one variable which is the ID, then set a veraible out and return a query / cursor. I got some help on this yesterday, but something is not right and it won't compile. Can someone help me sort this out? Here is what I have so far.
PROCEDURE SEEKER (pMonkeyID IN VARCHAR2, vMarkCounter OUT Number, seeker_cur OUT TYPES.ref_cursor)
AS
BEGIN
CURSOR seeker_cur IS
Select monkey_doc_approved, monkey_doc_vaulted
from monkeyApps
where MonkeyID = pMonkeyID
and monkey_doc_type = 'Banana'
order by monkey_doc_approved_timestamp,monkey_doc_type,monkey_doc_approved desc
vMarkCounter number:=0;
BEGIN
FOR i IN seeker_cur
LOOP
vMarkCounter := vMarkCounter+1;
END LOOP;
END;
END SEEKER;
I am not sure I am setting my cursor for returning right, and I am not sure I am looping correctly to set my monkeyMarker. the cursor needs to return as well as the marker because I deal with some front end logic with both.
Thanks, Frank