101 lines
3.1 KiB
SQL
101 lines
3.1 KiB
SQL
--
|
|
-- $Id$
|
|
--
|
|
-- Customer specific once-script YASK#67148.SQL.
|
|
-- Taak categorie toevoegen aan UDR view. Komt in volgende release mee.
|
|
DEFINE thisfile = 'YASK#67148.SQL'
|
|
DEFINE dbuser = '^YASK'
|
|
|
|
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 ------
|
|
|
|
CREATE OR REPLACE FORCE VIEW ins_v_udr_deelinspect
|
|
AS
|
|
SELECT d.deel_key,
|
|
d.discipline,
|
|
d.soort,
|
|
d.groep,
|
|
d.soortcode,
|
|
d.omschrijving,
|
|
d.plaatseigenaar,
|
|
d.plaatseigenaartype,
|
|
d.plaatsaanduiding,
|
|
d.eigenaar,
|
|
d.eigenaar_key,
|
|
d.opmerking,
|
|
d.regio,
|
|
d.district,
|
|
d.locatie_code,
|
|
d.locatie_omschrijving,
|
|
d.locatie_plaats,
|
|
d.gebouwcode,
|
|
d.gebouw,
|
|
d.terreinsectorcode,
|
|
d.terreinsector,
|
|
d.verdiepingcode,
|
|
d.ruimtenr,
|
|
d.werkplekvolgnr,
|
|
d.werkplek,
|
|
d.uitleenbaar,
|
|
d.uitgeleend,
|
|
d.res_opmerking,
|
|
d.beheerder,
|
|
d.vervaldatum,
|
|
d.actief,
|
|
d.aantal,
|
|
d.state,
|
|
d.statedate,
|
|
d.fclt_3d_discipline_key,
|
|
d.fclt_3d_afdeling_key,
|
|
d.fclt_3d_locatie_key,
|
|
idsc.ins_deelsrtcontrole_key,
|
|
idsc.ins_srtcontrole_key,
|
|
(SELECT cd.ins_discipline_omschrijving
|
|
FROM ctr_discipline cd, ins_srtcontrole isc
|
|
WHERE isc.ins_srtcontrole_key = idsc.ins_srtcontrole_key
|
|
AND isc.ctr_discipline_key = cd.ins_discipline_key) ctr_discipline_omschrijving,
|
|
(SELECT isc.ins_srtcontrole_omschrijving
|
|
FROM ins_srtcontrole isc
|
|
WHERE isc.ins_srtcontrole_key = idsc.ins_srtcontrole_key) srtcontrole_omschrijving,
|
|
idsc.ins_deelsrtcontrole_datum,
|
|
(SELECT icm.ins_controlemode_oms
|
|
FROM ins_controlemode icm
|
|
WHERE icm.ins_controlemode_key = idsc.ins_controlemode_key) controlemode_omschrijving,
|
|
idsc.ins_deelsrtcontrole_opmerking,
|
|
(SELECT prs_perslid_naam_full
|
|
FROM prs_v_perslid_fullnames_all pf
|
|
WHERE pf.prs_perslid_key = idsc.prs_perslid_key) perslid,
|
|
idsc.ins_deelsrtcontrole_datum_org,
|
|
idsc.ins_deelsrtcontrole_plandatum,
|
|
(SELECT lcl.x ('fc2l.fac_code2label_label', fc2l.fac_code2label_key, fc2l.fac_code2label_label)
|
|
FROM fac_code2label fc2l
|
|
WHERE fc2l.fac_code2label_domein = 'controle'
|
|
AND fc2l.fac_code2label_code = idsc.ins_deelsrtcontrole_status) deelsrtcontrole_status
|
|
FROM ins_v_udr_deel d,
|
|
ins_deelsrtcontrole idsc
|
|
WHERE d.deel_key = idsc.ins_deel_key;
|
|
|
|
------ 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
|