--
-- $Id$
--
-- Toekennen profiel aan personen 913848 DSM Zwolle

DEFINE thisfile = 'AADS#40411.SQL'
DEFINE dbuser   = '^AADS'
DEFINE custid   = 'AADS'

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

-- 1084 = 913848 DSM Zwolle
-- 1 = WO 500
UPDATE prs_perslid
   SET fac_profiel_key = 1
 WHERE     prs_perslid_verwijder IS NULL
       AND fac_profiel_key IS NULL
       AND prs_afdeling_key = 1084;

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

-- @@ &custid