--
-- $Id$
--
-- Script containing customer specific db-configuration for DJIN.
-- update all users with email @IND.MINVENJ.NL to @ind.nl
DEFINE thisfile = 'DJIN#57942.SQL'
DEFINE dbuser   = '^FMS'

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

UPDATE prs_perslid
   SET prs_perslid_email =
          REPLACE (UPPER (prs_perslid_email), '@IND.MINVENJ.NL', '@ind.nl')
 WHERE PRS_PERSLID_VERWIJDER IS NULL
       AND UPPER (prs_perslid_email) LIKE '%@IND.MINVENJ.NL';

------ payload end   ------

SET DEFINE OFF
BEGIN adm.systrackscriptId ('$Id$', 0); END;
/

COMMIT;
SET ECHO OFF
SPOOL OFF
SET DEFINE ON
PROMPT Logfile of this upgrade is: &fcltlogfile