
-- $Id$
--
-- PRS_PERSLID OSLOGIN moet omgezet worden van volledige mailadressen naar alleen dat wat voor @ staat

DEFINE thisfile = 'WELK#45807.SQL'
DEFINE dbuser   = '^WELK'

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_oslogin =
          SUBSTR (prs_perslid_oslogin,
                  1,
                  (INSTR (prs_perslid_oslogin, '@')) - 1)
 WHERE prs_perslid_oslogin IS NOT 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