WEHK#31644: periodieke controle.

svn path=/Customer/; revision=25288
This commit is contained in:
Maykel Geerdink
2015-05-26 12:20:01 +00:00
parent cd375f4632
commit 335a7f3fef

View File

@@ -9,11 +9,24 @@ SET ECHO ON
SPOOL xWEHK#31644.lst
SET DEFINE OFF;
DELETE FROM ins_deelsrtcontrole idsc
WHERE idsc.ins_deelsrtcontrole_key IN
(SELECT idsc1.ins_deelsrtcontrole_key
FROM ins_deelsrtcontrole idsc1
WHERE idsc1.ins_deelsrtcontrole_datum_org = fac.nextcyclusdate (idsc1.ins_deel_key, idsc1.ins_srtcontrole_key, 1));
DECLARE
CURSOR c
IS
SELECT idsc.ins_deelsrtcontrole_key
FROM ins_deelsrtcontrole idsc
WHERE idsc.ins_deelsrtcontrole_datum_org = fac.nextcyclusdate (idsc.ins_deel_key, idsc.ins_srtcontrole_key, 1);
BEGIN
FOR r1 IN c
LOOP
BEGIN
DELETE FROM ins_deelsrtcontrole idsc
WHERE idsc.ins_deelsrtcontrole_key = r1.ins_deelsrtcontrole_key;
END;
END LOOP;
END;
/
COMMIT;
SPOOL OFF;