DECLARE
  MIN_DATE DATE;
  MAX_DATE DATE;
  DIFF     NUMBER;
BEGIN
  SELECT MIN(TRUNC(ATTENDANCE_DT)),
    MAX(TRUNC(ATTENDANCE_DT))
  INTO MIN_DATE ,
    MAX_DATE
  FROM HRIS_ATTENDANCE;
  DIFF:=MAX_DATE-MIN_DATE;
  FOR i        IN 0..DIFF
  LOOP
    HRIS_REATTENDANCE(TRUNC(MIN_DATE  +i));
  END LOOP;
END;
