--
-- $Id$
--
-- ins_discipline_code vullen i.v.m. CND berekening

DEFINE thisfile = 'PLAT#61875.sql'
DEFINE dbuser   = '^WOWW'

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 ins_tab_discipline
   SET ins_discipline_code =
          SUBSTR (ins_discipline_omschrijving,
                  1,
                  INSTR (ins_discipline_omschrijving, ' ') - 1)
 WHERE UPPER (ins_discipline_module) = 'MLD'
       AND ins_discipline_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
