--
-- $Id$
--
-- Voor retail zorgen we ervoor dat de afbeeldingen bij bijlagen max 1500x1000 zijn.

DEFINE thisfile = 'YKPN#55423.sql'
DEFINE dbuser   = '^YKPN'
DEFINE custid   = '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 ------

UPDATE mld_kenmerk
   SET mld_kenmerk_regexp = 'r1500x1000'
 WHERE mld_kenmerk_key IN
           (SELECT k.mld_kenmerk_key
              FROM mld_kenmerk         k,
                   mld_stdmelding      std,
                   ins_tab_discipline  d,
                   mld_srtkenmerk      sk
             WHERE     std.mld_ins_discipline_key = d.ins_discipline_key
                   AND (   (    k.MLD_KENMERK_NIVEAU = 'S'
                            AND k.mld_stdmelding_key = std.mld_stdmelding_key)
                        OR (    k.MLD_KENMERK_NIVEAU = 'D'
                            AND k.mld_stdmelding_key = d.ins_discipline_key)
                        OR (    k.mld_kenmerk_niveau = 'T'
                            AND k.mld_stdmelding_key =
                                d.ins_srtdiscipline_key))
                   AND k.mld_srtkenmerk_key = sk.mld_srtkenmerk_key
                   AND sk.mld_srtkenmerk_kenmerktype = 'M'
                   AND d.ins_srtdiscipline_key = 41
                   AND k.mld_kenmerk_verwijder IS NULL
                   AND sk.mld_srtkenmerk_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
