Files
Customer/onces/BLCC/BLCC#73503.sql
Maarten van der Heide b2fbe71cb9 BLCC#73503 Alle Verbruiksartikelen-catalogi scopen op alle Locaties=Gebouwclusters
svn path=/Customer/; revision=56557
2022-07-12 14:10:09 +00:00

46 lines
1.3 KiB
SQL

--
-- $Id$
--
-- Customer specific once-script BLCC#73503.sql.
DEFINE thisfile = 'BLCC#73503.sql'
DEFINE dbuser = '^BLCC'
SET ECHO ON
SET DEFINE ON
COLUMN fcltlogfile NEW_VALUE fcltlogfile NOPRINT;
COLUMN fcltcusterr NEW_VALUE fcltcusterr NOPRINT;
WHENEVER SQLERROR CONTINUE;
SELECT adm.getscriptspoolfile('&thisfile') AS fcltlogfile FROM DUAL;
SPOOL &fcltlogfile
WHENEVER SQLERROR EXIT;
SELECT adm.checkscriptcust('&dbuser') AS fcltcusterr FROM DUAL;
WHENEVER SQLERROR CONTINUE;
PROMPT &fcltcusterr
SET DEFINE OFF
------ payload begin ------
-- BLCC#73503: Alle Verbruiksartikelen-catalogi scopen op alle locaties!
INSERT INTO res_srtartikel_onrgoed (alg_onrgoed_key, alg_onrgoed_niveau, res_discipline_key)
SELECT l.alg_locatie_key alg_onrgoed_key,
'L' alg_onrgoed_niveau,
rd.ins_discipline_key res_discipline_key
FROM alg_v_aanweziglocatie l, res_discipline rd
WHERE l.alg_locatie_key > 1
AND rd.ins_discipline_verwijder IS NULL
AND rd.ins_discipline_min_level = 2
ORDER BY 1, 2, 3;
COMMIT;
------ 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