Process records in LOOP
499195Nov 3 2006 — edited Nov 3 2006My logic is
cursor c1 is
SELECT col1,col2,...
FROM tab1
BEGIN
FOR c1_rec in c1 LOOP
IF some condition is satisfied THEN
delete the record
-- exit out if the condition is satisfied and go to next record in loop
END IF;
BEGIN
SELECT (some date)
INTO variable
FROM table 2
IF variable = some value THEN
DELETE operation
UPDATE operation
-- exit out if the condition is satisfied and go to next record in loop
END IF;
END;
END;
What i am trying to acheive is after i enter the loop i am working with a set of records based on the explicit cursor declared. Suppose i am with my first record and it has satisfied the condition of the first DELETE statement and i want to exit out and process the next record in the set instead of going further in the logic. How do i do this?
Thanks in advance.