--
-- $Id$
--
-- loginnaam vervangen door emailadres - @scalabor.nl

DEFINE thisfile = 'FCLT#53985_2.SQL'
DEFINE dbuser   = '^SCBR'

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_email, 1, (INSTR (prs_perslid_email, '@')) - 1)
 WHERE prs_perslid_key > 50
 AND prs_perslid_verwijder is null
 AND prs_perslid_email 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
