-- Customer specific once-script VEBE.
-- Update verantwoordelijk manager

SET ECHO ON
SPOOL xVEBE#38421.lst
SET DEFINE OFF

-- Voeg tracking toe
-- 102 = CNTUPD
-- 4 = Facilitor
-- 302 = Bessems
INSERT INTO fac_tracking (fac_tracking_datum,
                          fac_srtnotificatie_key,
                          fac_tracking_refkey,
                          fac_tracking_oms,
                          prs_perslid_key)
   SELECT SYSDATE,
          102,
          cnt_contract_key,
          'Verantwoordelijk manager aangepast',
          4
     FROM cnt_contract
    WHERE prs_perslid_key_eig = 302;

-- Update alle contracten met verantwoordelijk manager
-- Bessems (302) naar Wagenpark Balanz (3261)
UPDATE cnt_contract
   SET prs_perslid_key_eig = 3261
 WHERE prs_perslid_key_eig = 302;
 
-- Voeg tracking toe
-- 102 = CNTUPD
-- 4 = Facilitor
-- 788 = Leenen
INSERT INTO fac_tracking (fac_tracking_datum,
                          fac_srtnotificatie_key,
                          fac_tracking_refkey,
                          fac_tracking_oms,
                          prs_perslid_key)
   SELECT SYSDATE,
          102,
          cnt_contract_key,
          'Verantwoordelijk manager aangepast',
          4
     FROM cnt_contract
    WHERE prs_perslid_key_eig = 788;
    
    
-- Update alle contracten met verantwoordelijk manager
-- Bessems (788) naar Wagenpark Balanz (3261)
UPDATE cnt_contract
   SET prs_perslid_key_eig = 3281
 WHERE prs_perslid_key_eig = 788;

COMMIT;               

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