58 lines
1.7 KiB
SQL
58 lines
1.7 KiB
SQL
--
|
|
-- $Id$
|
|
--
|
|
-- Voor het herstellen van de verwijderde inspectie records
|
|
|
|
DEFINE thisfile = 'WOHW#79637.sql'
|
|
DEFINE dbuser = '^WOHW'
|
|
|
|
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 ------
|
|
|
|
INSERT INTO ins_deelsrtcontrole (ins_deel_key,
|
|
ins_srtcontrole_key,
|
|
ins_scenario_key,
|
|
ins_deelsrtcontrole_plandatum,
|
|
ins_deelsrtcontrole_status,
|
|
prs_perslid_key)
|
|
SELECT xcp.ins_deel_key,
|
|
xcp.ins_srtcontrole_key,
|
|
xcp.ins_scenario_key,
|
|
NULL plandatum,
|
|
0 status,
|
|
3 perslid
|
|
FROM ins_srtcontroledl_xcp xcp
|
|
WHERE NOT EXISTS
|
|
(SELECT *
|
|
FROM ins_deelsrtcontrole ids
|
|
WHERE xcp.ins_deel_key = ids.ins_deel_key
|
|
AND xcp.ins_srtcontrole_key = ids.ins_srtcontrole_key
|
|
AND xcp.ins_scenario_key = ids.ins_scenario_key)
|
|
AND xcp.ins_scenario_key > 1;
|
|
|
|
|
|
------ 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 |