--
-- $Id$
--
-- Vervaldatum van de catalogus gereedschappen twee weken opschuiven ivm vakantie.

DEFINE thisfile = 'MDUX#41876.SQL'
DEFINE dbuser   = '^MDUX'
DEFINE custid   = 'MDUX'

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 bes_srtdeel
   SET bes_srtdeel_vervaldatum = TO_DATE ('20170915', 'yyyymmdd')
 WHERE bes_srtdeel_key IN
           (SELECT bes_srtdeel_key
              FROM bes_srtdeel sd, bes_srtgroep sg
             WHERE     sd.bes_srtgroep_key = sg.bes_srtgroep_key
                   AND sg.INS_DISCIPLINE_KEY = 64
                   AND bes_srtdeel_verwijder IS NULL
                   AND bes_srtdeel_vervaldatum =
                       TO_DATE ('20170901', 'yyyymmdd'));



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