--
-- $Id$
--
-- Verwijderen referentie kenmerk met ongeldige waarde 'X'
-- Nog onverklaard hoe het is ontstaan

DEFINE thisfile = 'YKPN#53546.sql'
DEFINE dbuser   = '^YKPN'

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

DELETE FROM bez_kenmerkwaarde
      WHERE bez_kenmerk_key = 1003 -- refmerk autorisator
        AND fac.safe_to_number(bez_kenmerkwaarde_waarde) 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


