VNOG#89849 -- Bedrijven als contractant aanmerken
svn path=/Customer/; revision=69746
This commit is contained in:
61
onces/VNOG/VNOG#89849.sql
Normal file
61
onces/VNOG/VNOG#89849.sql
Normal file
@@ -0,0 +1,61 @@
|
||||
--
|
||||
-- $Id$
|
||||
--
|
||||
-- Alle relaties markeren als contractant
|
||||
--
|
||||
|
||||
DEFINE thisfile = 'VNOG#89849.SQL'
|
||||
DEFINE dbuser = 'VNOG'
|
||||
|
||||
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 prs_bedrijf_key
|
||||
FROM prs_bedrijf
|
||||
WHERE prs_bedrijf_verwijder IS NULL;
|
||||
|
||||
BEGIN
|
||||
FOR rec IN c1
|
||||
LOOP
|
||||
BEGIN
|
||||
UPDATE prs_bedrijf
|
||||
SET prs_bedrijf_contract = 1
|
||||
WHERE prs_bedrijf_key = rec.prs_bedrijf_key;
|
||||
|
||||
fac.trackaction (
|
||||
'PRSUPB',
|
||||
rec.prs_bedrijf_key,
|
||||
3,
|
||||
NULL,
|
||||
'Contractant: (leeg) --> 1');
|
||||
|
||||
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