
--
-- $Id$
--
-- HPJI#57845: Naamswijziging Elker-Het Poortje per 1-07-2019 naar Elker Jeugdhulp & Onderwijs
-- correctie op foute parent (afdeling heeft eigen afdelingkey ook als parentkey)

DEFINE thisfile = 'HPJI#57845.SQL'
DEFINE dbuser   = '^HPJI'

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;
SET DEFINE OFF

------ payload begin ------

update prs_afdeling p
set p.PRS_AFDELING_PARENTKEY  = '1281'
where p.PRS_AFDELING_KEY = '961';

commit;

------ 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
