64 lines
1.6 KiB
SQL
64 lines
1.6 KiB
SQL
--
|
|
-- $Id$
|
|
--
|
|
-- Indexeren van kosten periodieke taken met 3.5% voor WOMD
|
|
|
|
DEFINE thisfile = 'WOMD#79981.sql'
|
|
DEFINE dbuser = 'WOMD'
|
|
|
|
SET ECHO ON
|
|
SET DEFINE ON
|
|
COLUMN fcltlogfile NEW_VALUE fcltlogfile NOPRINT;
|
|
COLUMN fcltcusttxt NEW_VALUE fcltcusttxt NOPRINT;
|
|
WHENEVER SQLERROR CONTINUE;
|
|
SELECT adm.getscriptspoolfile('&thisfile') AS fcltlogfile FROM DUAL;
|
|
SPOOL &fcltlogfile
|
|
WHENEVER SQLERROR EXIT;
|
|
SELECT adm.checkscriptcust('&dbuser') AS fcltcusttxt FROM DUAL;
|
|
WHENEVER SQLERROR CONTINUE;
|
|
---------------------------------------
|
|
PROMPT &fcltcusttxt
|
|
---------------------------------------
|
|
SET DEFINE OFF
|
|
|
|
------ payload begin ------
|
|
|
|
BEGIN
|
|
DECLARE
|
|
CURSOR c1
|
|
IS
|
|
SELECT ins_srtcontrole_key FROM ins_srtcontrole;
|
|
BEGIN
|
|
FOR rec IN c1
|
|
LOOP
|
|
BEGIN
|
|
UPDATE ins_srtcontrole
|
|
SET ins_srtcontrole_kosten2 = ins_srtcontrole_kosten2 * 1.035
|
|
WHERE ins_srtcontrole_key = rec.ins_srtcontrole_key;
|
|
|
|
FAC.trackaction ('CTRSUP',
|
|
rec.ins_srtcontrole_key,
|
|
3,
|
|
SYSDATE,
|
|
'Indexatie van 3.5% uitgevoerd door systeem.');
|
|
END;
|
|
END LOOP;
|
|
|
|
UPDATE ins_srtcontroledl_xcp
|
|
SET ins_srtcontroledl_xcp_kosten2 =
|
|
ins_srtcontroledl_xcp_kosten2 * 1.035;
|
|
END;
|
|
END;
|
|
/
|
|
|
|
------ payload end ------
|
|
|
|
SET DEFINE OFF
|
|
BEGIN adm.systrackscriptId ('$Id$', 0); END;
|
|
/
|
|
|
|
COMMIT;
|
|
SET ECHO OFF
|
|
SPOOL OFF
|
|
SET DEFINE ON
|
|
PROMPT Logfile of this upgrade is: &fcltlogfile |