--
-- $Id$
--
-- Customer specific once-script BLCC19.
DEFINE thisfile = 'BLCC19.SQL'
DEFINE dbuser   = '^BLCC'

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

-- BVO to VVO op FIN-ruimten.
UPDATE alg_ruimte
   SET alg_ruimte_opp_alt1 = alg_ruimte_bruto_vloeropp
 WHERE alg_ruimte_verwijder IS NULL
   AND alg_ruimte_nr LIKE 'FIN%'
   AND alg_ruimte_bruto_vloeropp IS NOT NULL;

COMMIT;

-- BVO wissen op FIN-ruimten.
UPDATE alg_ruimte
   SET alg_ruimte_bruto_vloeropp = NULL
 WHERE alg_ruimte_verwijder IS NULL
   AND alg_ruimte_nr LIKE 'FIN%'
   AND alg_ruimte_bruto_vloeropp IS NOT NULL
   AND alg_ruimte_opp_alt1 = alg_ruimte_bruto_vloeropp;

COMMIT;

------ payload end   ------

SET DEFINE OFF
BEGIN adm.systrackscriptId ('$Id$'); END;
/

COMMIT;
SET ECHO OFF
SPOOL OFF
SET DEFINE ON
PROMPT Logfile of this upgrade is: &fcltlogfile

@@&custid
