SUTF#88794 -- Omhangen van diverse objectsoorten naar nieuwe groepen
svn path=/Customer/; revision=69430
This commit is contained in:
88
onces/SUTF/SUTF#88794.sql
Normal file
88
onces/SUTF/SUTF#88794.sql
Normal file
@@ -0,0 +1,88 @@
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
-- Op verzoek van SUTF bepaalde objectsoorten omhangen naar een nieuwe groep
|
||||
|
||||
DEFINE thisfile = 'SUTF#88794.SQL'
|
||||
DEFINE dbuser = 'SUTF'
|
||||
|
||||
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 ------
|
||||
|
||||
DECLARE
|
||||
CURSOR c1 IS
|
||||
SELECT s.ins_srtdeel_key, g.ins_srtgroep_omschrijving
|
||||
FROM ins_srtdeel s, ins_srtgroep g
|
||||
WHERE s.ins_srtgroep_key = g.ins_srtgroep_key
|
||||
AND s.ins_srtdeel_key IN (1694,
|
||||
1690,
|
||||
1693,
|
||||
1419,
|
||||
3161,
|
||||
3601,
|
||||
3121,
|
||||
3143,
|
||||
3145,
|
||||
3144,
|
||||
3162,
|
||||
1689);
|
||||
BEGIN
|
||||
UPDATE ins_srtdeel
|
||||
SET ins_srtgroep_key = 566
|
||||
WHERE ins_srtdeel_key IN (1694,
|
||||
1690,
|
||||
1693,
|
||||
1419,
|
||||
3161);
|
||||
|
||||
UPDATE ins_srtdeel
|
||||
SET ins_srtgroep_key = 565
|
||||
WHERE ins_srtdeel_key IN (3601,
|
||||
3121,
|
||||
3143,
|
||||
3145,
|
||||
3144,
|
||||
3162);
|
||||
|
||||
UPDATE ins_srtdeel
|
||||
SET ins_srtgroep_key = 564
|
||||
WHERE ins_srtdeel_key = 1689;
|
||||
|
||||
FOR rec IN c1
|
||||
LOOP
|
||||
BEGIN
|
||||
fac.trackaction (
|
||||
'INSSUP',
|
||||
rec.ins_srtdeel_key,
|
||||
4,
|
||||
NULL,
|
||||
'Objectsoort omgezet naar groep '
|
||||
|| rec.ins_srtgroep_omschrijving);
|
||||
END;
|
||||
END LOOP;
|
||||
END;
|
||||
/
|
||||
|
||||
------ 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