-- Customer specific once-script SUTF#38101

SET ECHO ON
SPOOL xSUTF#38101.lst
SET DEFINE OFF

-- Verwijder alle dubbele controles die een foutmelding geven (bv enkele controles op 06-07-2016 9:08:00).
DELETE FROM ins_deelsrtcontrole
      WHERE ins_deelsrtcontrole_key IN (SELECT max_dsc_key
                                          FROM (  SELECT MAX (ins_deelsrtcontrole_key) max_dsc_key,
                                                         ins_deel_key
                                                    FROM ins_deelsrtcontrole
                                                GROUP BY ins_deelsrtcontrole_datum,
                                                         ins_deel_key
                                                  HAVING COUNT (ins_deelsrtcontrole_datum) > 1));
commit;

BEGIN adm.systrackscriptId('$Id$'); END;
/

commit;

SPOOL OFF