--
-- $Id$
--
-- Zet alle schoonmaakobject op inactief zolang het niet omg gebouw
-- PP033 gaat.

DEFINE thisfile = 'IVET#38064.SQL'
DEFINE dbuser   = '^IVET'
DEFINE custid   = 'IVET'

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_deel
   SET ins_deel_actief = 0
 WHERE ins_deel_key IN
             (SELECT ins_deel_key
                FROM ins_v_deel_gegevens
               WHERE ins_discipline_omschrijving = 'Schoonmaak' AND alg_gebouw_upper <> 'PP033');

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

--@@ &custid