--
-- $Id$
--
-- Vervolg op 48547.sql. In cnt_contract_object stonden na update ins_srtdeel_key nog oude ins_srtdeel_keys
-- personenvoorloopauto (key 1), bedrijfsvoorloopauto (key 6)


DEFINE thisfile = 'VEBE#48547_2.SQL'
DEFINE dbuser   = '^VEBE'
DEFINE custid   = 'VEBE'

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 cnt_contract_object
   SET cnt_ins_srtdeel_key =
          (SELECT ins_srtdeel_key
             FROM ins_deel
            WHERE ins_deel_key = cnt_ins_deel_key)
                  where cnt_ins_deel_key IS NOT NULL
                  and cnt_ins_srtdeel_key in ( 1, 6);

------ 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