--
-- $Id$
--
-- Customer specific once-script BLCC#37691.SQL.

DEFINE thisfile = 'BLCC#37691.SQL'
DEFINE dbuser   = '^BLCC'

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
   SET cnt_contract_korting = ROUND (cnt_contract_korting / 12, 2)
 WHERE     cnt_contract_verwijder IS NULL
       AND ins_discipline_key = 621
       AND cnt_contract_status = 0
       AND cnt_contract_looptijd_tot > ADD_MONTHS (TRUNC (SYSDATE, 'mm'), 2)
       AND cnt_contract_korting IS NOT NULL;

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