60 lines
2.2 KiB
SQL
60 lines
2.2 KiB
SQL
--
|
|
-- $Id$
|
|
--
|
|
-- Script containing customer specific sql statements for the RABO database
|
|
-- De vast bijlage die mee moeten met de opdrachten en contracten voor de leveranciers contracting party en managing agent goedzetten
|
|
|
|
DEFINE thisfile = 'RABO#61087.SQL'
|
|
DEFINE dbuser = '^RABO'
|
|
|
|
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 ------
|
|
|
|
-- CONTRACTING - PARTY
|
|
----- bijlage 'HEYDAY_Algemene Inkoopvoorwaarden_Versie februari 2018.pdf' moet mee.....
|
|
UPDATE prs_bedrijfadres
|
|
SET prs_bedrijfadres_attachfile = 'HEYDAY_Algemene Inkoopvoorwaarden_Versie februari 2018.pdf'
|
|
WHERE prs_bedrijfadres_key IN
|
|
(SELECT a.prs_bedrijfadres_key
|
|
FROM prs_bedrijf b, prs_bedrijfadres a
|
|
WHERE b.prs_bedrijf_key = a.prs_bedrijf_key
|
|
AND b.prs_relatietype_key = 1 -- Contracting Party
|
|
AND b.prs_bedrijf_verwijder IS NULL
|
|
AND a.prs_bedrijfadres_attachfile <>
|
|
'HEYDAY_Algemene Inkoopvoorwaarden_Versie februari 2018.pdf'
|
|
AND a.prs_bedrijfadres_type IN ('C', 'O')) ;
|
|
|
|
-- MANAGING AGENT
|
|
----- Bijlage 'RABO_Inkoopvoorwaarden 2018-NL.pdf' moet meegestuurd worden..
|
|
UPDATE prs_bedrijfadres
|
|
SET prs_bedrijfadres_attachfile = 'RABO_Inkoopvoorwaarden 2018-NL.pdf'
|
|
WHERE prs_bedrijfadres_key IN
|
|
(SELECT a.prs_bedrijfadres_key
|
|
FROM prs_bedrijf b, prs_bedrijfadres a
|
|
WHERE b.prs_bedrijf_key = a.prs_bedrijf_key
|
|
AND b.prs_relatietype_key = 2 -- Managing_agent
|
|
AND b.prs_bedrijf_verwijder IS NULL
|
|
AND a.prs_bedrijfadres_attachfile <>
|
|
'RABO_Inkoopvoorwaarden 2018-NL.pdf'
|
|
AND a.prs_bedrijfadres_type IN ('C', 'O')) ;
|
|
|
|
|
|
----- 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 |