October 2005
Intermediate to advanced
454 pages
14h 44m
English
The main algorithm of the function is a loop that fetches records from the REF cursor as shown in this pseudo-code.
BEGIN
-- for every order...
LOOP
FETCH p_curs INTO v_order;
EXIT WHEN p_curs%NOTFOUND;
IF it's a repeat order then
PIPE ROW( );
END IF;
END LOOP; -- every order
RETURN;
END;It’s very straightforward. Just fetch records from the passed-in cursor and evaluate them against repeat-order criteria. If a match is found, then pipe a record upstream. Now I’ll add in the loading of the regions’ repeat-order criteria.