LOOP
--do something...
IF :SYSTEM.LAST_RECORD = 'TRUE'
THEN
EXIT;
END IF;
NEXT_RECORD;
-- v_i := v_i + 1;
END LOOP;
--example :
go_block('detail');
FIRST_RECORD;
LOOP
if :cancel_flag = 'Y' then
UPDATE xxcompany_oe_goods_label_all
SET cancel_flag = 'Y',
cancel_time = NVL (:header.cancel_time, SYSDATE)
WHERE gl_id= :gl_id;
end if;
COMMIT;
IF :SYSTEM.LAST_RECORD = 'TRUE'
THEN
EXIT;
END IF;
NEXT_RECORD;
-- v_i := v_i + 1;
END LOOP;
:parameter.p_query := 'y';
EXECUTE_QUERY;
:parameter.p_query := 'n';