/* ----------------------------------------------------------------------------------- */
/* OBJETIVO: LIMPAR A TABELA DE LOG LISTAFIN E LISTAREDZ PARA APGAGAR OS REGISTROS     */
/* TODOS OS DIAS AS 6 DA MANHA                                                         */
/* ----------------------------------------------------------------------------------- */
create or replace PROCEDURE APAGA_LISTA
AS
   V_QTDIAS NUMBER;
BEGIN

   DELETE FROM LISTAFIN
    WHERE DTINCLUSAO <  SYSDATE-3/24;

   DELETE FROM LISTAREDZ
    WHERE DTULTATULISTREDZ <  SYSDATE-3/24;
    
   COMMIT;
END;
/

-- VERSAO --
BEGIN ATUVEROBJ('APAGA_LISTA','5.67.XXX'); END;
/

