How does one iterate through items and records in a specified block?

Q

How does one iterate through items and records in a specified block?

✍: Guest

A

One can use NEXT_FIELD to iterate (loop) through items in a specific block and NEXT_RECORD to iterate through records in a block. Code example:

OriPos := TO_NUMBER(:System.Trigger_Record);
First_Record;
LOOP
-- do processing
IF (:System.Last_Record = 'TRUE') THEN
Go_Record(OriPos);
EXIT;
ELSE
Next_Record;
END IF;
END LOOP

2011-03-22, 7562👍, 0💬