--
-- $Id$
--
-- Bij alle numerieke kenmerkwaarden die vanuit de conversie zijn overgekomen de komma's verwijderen door de punten

DEFINE thisfile = 'LOGC#42087.SQL'
DEFINE dbuser   = '^LOGC'

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

BEGIN
   FAC.initsession ('NL');
END;                                 
/
                     
UPDATE mld_kenmerkmelding km
   SET mld_kenmerkmelding_waarde =
          REPLACE (mld_kenmerkmelding_waarde, ',', '.')
 WHERE mld_kenmerkmelding_key IN
             (SELECT mld_kenmerkmelding_key
                FROM mld_srtkenmerk sk, mld_kenmerk k,  mld_kenmerkmelding km
               WHERE     sk.mld_srtkenmerk_kenmerktype = 'N'
                     AND k.mld_srtkenmerk_key = sk.mld_srtkenmerk_key
                     AND km.mld_kenmerk_key = k.mld_kenmerk_key
                     AND k.mld_kenmerk_verwijder is null
                     AND mld_kenmerkmelding_waarde LIKE '%,%');
                       
COMMIT;

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