78 lines
2.9 KiB
SQL
78 lines
2.9 KiB
SQL
--
|
|
-- $Id$
|
|
--
|
|
-- Customer specific once-script BLCC#57460.SQL.
|
|
DEFINE thisfile = 'BLCC#57460.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 ------
|
|
|
|
-- BLCC#57460: Indexatie:
|
|
-- 1. Graag op alle contracten van het soort Lease Agreement de velden Contracttarief vermenigvuldigen met 1.028 (2,8%).
|
|
UPDATE cnt_kenmerkcontract kc
|
|
SET kc.cnt_kenmerkcontract_waarde = 1.028 * kc.cnt_kenmerkcontract_waarde
|
|
WHERE kc.cnt_kenmerkcontract_verwijder IS NULL
|
|
AND EXISTS
|
|
(SELECT 1
|
|
FROM cnt_kenmerk
|
|
WHERE cnt_srtkenmerk_key IN (385, 386, 387, 388, 389) -- Contracttarief H/K/L/O/T
|
|
AND cnt_kenmerk_key = kc.cnt_kenmerk_key)
|
|
AND EXISTS
|
|
(SELECT 1
|
|
FROM cnt_contract
|
|
WHERE ins_discipline_key IN (2122) -- Lease Agreement
|
|
AND cnt_contract_key = kc.cnt_contract_key);
|
|
COMMIT;
|
|
|
|
-- 2. Graag op alle gebouwen de velden Standaardtarief vermenigvuldigen met 1.028 (2,8%).
|
|
UPDATE alg_onrgoedkenmerk ok
|
|
SET ok.alg_onrgoedkenmerk_waarde = 1.028 * ok.alg_onrgoedkenmerk_waarde
|
|
WHERE ok.alg_onrgoedkenmerk_verwijder IS NULL
|
|
AND alg_kenmerk_key IN (1180, 1181, 1182, 1183, 1184, 1241) -- Standaardtarief L/H/K/O/T/C
|
|
;
|
|
COMMIT;
|
|
|
|
-- 3. Graag op alle gebouwen de velden OZB tarief, Voorschot Collective Services en FES Subsidie vermenigvuldigen met 1.0181 (1,81%).
|
|
UPDATE alg_onrgoedkenmerk ok
|
|
SET ok.alg_onrgoedkenmerk_waarde = 1.0181 * ok.alg_onrgoedkenmerk_waarde
|
|
WHERE ok.alg_onrgoedkenmerk_verwijder IS NULL
|
|
AND alg_kenmerk_key IN
|
|
(1180, 1181, 1182, 1183, 1184, 1241, -- OZB tarief L/H/K/O/T/C
|
|
1205, 1206, 1207, 1208, 1209, 1243, -- Voorschot Collective Services L/H/K/O/T/C
|
|
1220, 1221, 1222, 1223, 1224, 1245) -- FES Subsidie L/H/K/O/T/C
|
|
;
|
|
COMMIT;
|
|
|
|
-- 4. Graag op alle contracten van het soort SLA Managed Connectivity het veld Managed Connectivity (jaarbedrag) vermenigvuldigen met 1.028 (2,8%).
|
|
UPDATE cnt_kenmerkcontract kc
|
|
SET kc.cnt_kenmerkcontract_waarde = 1.028 * kc.cnt_kenmerkcontract_waarde
|
|
WHERE kc.cnt_kenmerkcontract_verwijder IS NULL
|
|
AND cnt_kenmerk_key = 637 -- Managed Connectivity (jaarbedrag)
|
|
AND EXISTS
|
|
(SELECT 1
|
|
FROM cnt_contract
|
|
WHERE ins_discipline_key IN (2185) -- SLA Managed Connectivity
|
|
AND cnt_contract_key = kc.cnt_contract_key);
|
|
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
|