--
-- $Id$
--
-- Melder + kostenplaats wijzigen van melding PR127536

DEFINE thisfile = 'AASA#40131.SQL'
DEFINE dbuser   = '^AASA'
DEFINE custid   = 'AASA'

SET ECHO ON
SET DEFINE ON
COLUMN fcltlogfile NEW_VALUE fcltlogfile NOPRINT;
WHENEVER SQLERROR EXIT;
SELECT adm.scriptspoolfile('&dbuser', '&thisfile') AS fcltlogfile FROM DUAL;
WHENEVER SQLERROR CONTINUE;
SPOOL &fcltlogfile
SET DEFINE OFF

------ payload begin ------

-- Update melder
UPDATE mld_melding
   SET prs_perslid_key = 2881
 WHERE mld_melding_key = 127536;

-- key 28 = MLDUPD
INSERT INTO fac_tracking (fac_tracking_datum,
                          fac_srtnotificatie_key,
                          fac_tracking_refkey,
                          fac_tracking_oms)
    VALUES (SYSDATE,
            28,
            127536,
            'Melder op verzoek van AAFM gewijzigd - Close (Noël) -> Vliex (Ed)');

-- Update kostenplaats
UPDATE mld_melding
   SET prs_kostenplaats_key = 1781
 WHERE mld_melding_key = 127536;

-- key 28 = MLDUPD
INSERT INTO fac_tracking (fac_tracking_datum,
                          fac_srtnotificatie_key,
                          fac_tracking_refkey,
                          fac_tracking_oms)
    VALUES (SYSDATE,
            28,
            127536,
            'Kostenplaats op verzoek van AAFM gewijzigd - 108505  ->  00600011');

------ payload end   ------

SET DEFINE OFF
BEGIN adm.systrackscriptId ('$Id$', 1); END;
/

COMMIT;
SET ECHO OFF
SPOOL OFF
SET DEFINE ON
PROMPT Logfile of this upgrade is: &fcltlogfile

--@@ &custid