- Customer specific once-script

SET ECHO ON
SET DEFINE ON
column fcltlogfile new_value fcltlogfile NOPRINT;

SELECT UPPER (USER) || '_NYBU#35318' || '.lst' AS fcltlogfile FROM DUAL;

spool &fcltlogfile
SET DEFINE OFF;

DELETE res_kenmerkwaarde kw
 WHERE res_kenmerk_key IN (SELECT res_kenmerk_key
                             FROM res_kenmerk
                            WHERE res_srtkenmerk_key IN (202, 261))
   AND res_rsv_ruimte_key IN
             (SELECT rr.res_rsv_ruimte_key
                FROM res_kenmerkwaarde kw, res_kenmerk k, res_rsv_ruimte rr
               WHERE kw.res_kenmerk_key = k.res_kenmerk_key
                 AND k.res_srtkenmerk_key = 202
                 AND kw.res_rsv_ruimte_key = rr.res_rsv_ruimte_key
                 AND TRUNC (kw.res_kenmerkwaarde_aanmaak) =
                        TRUNC (rr.res_rsv_ruimte_aanmaak)
                 AND res_status_bo_key = 2)
   AND res_rsv_ruimte_key > 60000;
           
 

BEGIN adm.systrackscriptId('$Id$'); END;
/
COMMIT;

SPOOL OFF