--
-- $Id$
--
-- Aanmaken import tabel voor import van Topdesk tickets

DEFINE thisfile = 'UBRH#55068.SQL'
DEFINE dbuser   = '^UBRH'

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 ------
/* Jos: eenmalig om indeling TopDesk af te splitsen van defintieve organisatiestructuur */
UPDATE PRS_AFDELING
SET PRS_AFDELING_NAAM = '_' || PRS_AFDELING_NAAM
WHERE PRS_AFDELING_AANMAAK <  TO_DATE('01-12-2018', 'DD-MM-YYYY')
AND PRS_AFDELING_VERWIJDER IS NULL
;


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