BLCC#70130 Einddatum van lopende ADDD-contracten naar 31-12-2050
svn path=/Customer/; revision=54262
This commit is contained in:
47
onces/BLCC/BLCC#70130.sql
Normal file
47
onces/BLCC/BLCC#70130.sql
Normal file
@@ -0,0 +1,47 @@
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
-- Customer specific once-script BLCC#70130.sql.
|
||||
DEFINE thisfile = 'BLCC#70130.sql'
|
||||
DEFINE dbuser = '^BLCC'
|
||||
|
||||
SET ECHO ON
|
||||
SET DEFINE ON
|
||||
COLUMN fcltlogfile NEW_VALUE fcltlogfile NOPRINT;
|
||||
COLUMN fcltcusterr NEW_VALUE fcltcusterr NOPRINT;
|
||||
WHENEVER SQLERROR CONTINUE;
|
||||
SELECT adm.getscriptspoolfile('&thisfile') AS fcltlogfile FROM DUAL;
|
||||
SPOOL &fcltlogfile
|
||||
WHENEVER SQLERROR EXIT;
|
||||
SELECT adm.checkscriptcust('&dbuser') AS fcltcusterr FROM DUAL;
|
||||
WHENEVER SQLERROR CONTINUE;
|
||||
PROMPT &fcltcusterr
|
||||
SET DEFINE OFF
|
||||
|
||||
------ payload begin ------
|
||||
|
||||
-- BLCC#70130
|
||||
-- Wijzig de einddatum van alle lopende ADDD-contracten naar 31-12-2050!
|
||||
UPDATE cnt_contract c
|
||||
SET c.cnt_contract_looptijd_tot = TO_DATE ('31-12-2050', 'dd-mm-yyyy')
|
||||
WHERE c.cnt_contract_verwijder IS NULL
|
||||
AND c.cnt_contract_looptijd_tot = TO_DATE ('31-12-2021', 'dd-mm-yyyy')
|
||||
AND c.ins_discipline_key IN (1841, 1842) -- Additionele diensten (Vergadervoorzieningen en Klantwensen)
|
||||
AND NOT EXISTS
|
||||
(SELECT 1
|
||||
FROM cnt_v_aanwezigcontract
|
||||
WHERE cnt_contract_nummer_intern = c.cnt_contract_nummer_intern
|
||||
AND COALESCE (cnt_contract_versie, '0') > COALESCE (c.cnt_contract_versie, '0'));
|
||||
COMMIT;
|
||||
|
||||
------ 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
|
||||
Reference in New Issue
Block a user