-- Customer specific once-script

SET ECHO ON
SPOOL xPHCE10.lst
SET DEFINE OFF


UPDATE mld_kenmerkmelding km
   SET mld_kenmerk_key = 402
 WHERE km.mld_kenmerk_key = 34
   AND EXISTS
          (SELECT mld_melding_key
             FROM mld_melding m
            WHERE m.mld_melding_key = km.mld_melding_key
              AND m.mld_stdmelding_key = 1);

UPDATE mld_kenmerkmelding km
   SET mld_kenmerk_key = 401
 WHERE km.mld_kenmerk_key = 34
   AND EXISTS
          (SELECT mld_melding_key
             FROM mld_melding m
            WHERE m.mld_melding_key = km.mld_melding_key
              AND m.mld_stdmelding_key = 2);
              
UPDATE mld_kenmerkmelding km
   SET mld_kenmerk_key = 406
 WHERE km.mld_kenmerk_key = 34
   AND EXISTS
          (SELECT mld_melding_key
             FROM mld_melding m
            WHERE m.mld_melding_key = km.mld_melding_key
              AND m.mld_stdmelding_key = 4);

UPDATE mld_kenmerkmelding km
   SET mld_kenmerk_key = 403
 WHERE km.mld_kenmerk_key = 34
   AND EXISTS
          (SELECT mld_melding_key
             FROM mld_melding m
            WHERE m.mld_melding_key = km.mld_melding_key
              AND m.mld_stdmelding_key = 5);

UPDATE mld_kenmerkmelding km
   SET mld_kenmerk_key = 405
 WHERE km.mld_kenmerk_key = 34
   AND EXISTS
          (SELECT mld_melding_key
             FROM mld_melding m
            WHERE m.mld_melding_key = km.mld_melding_key
              AND m.mld_stdmelding_key = 6);

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

SPOOL OFF

@pche.sql