BAUS#80301: Opties voor aanmaken kenmerken bij taken gelijk maken als bij andere modules.

svn path=/Database/trunk/; revision=66495
This commit is contained in:
Maykel Geerdink
2024-10-07 13:25:11 +00:00
parent 80306f91a1
commit 45718b05cb
2 changed files with 36 additions and 28 deletions

View File

@@ -12,6 +12,42 @@ AS
DEFINIEER_VIEW_AANWEZIG(ctr_discipline, ins_discipline_verwijder,
ctr_v_aanwezigdiscipline, 0);
CREATE_VIEW(ctr_v_allsrtinstallatie, 0)
(
niveau,
ctr_srtinstallatie_key,
discipline_oms,
srtcontrole_oms,
ins_discipline_key,
ins_srtcontrole_key
)
AS
SELECT 'E',
cd.ins_discipline_key,
cd.ins_discipline_omschrijving,
NULL ins_srtcontrole_omschrijving,
cd.ins_discipline_key,
NULL ins_srtcontrole_key
FROM ctr_discipline cd
UNION
SELECT 'C',
isc.ins_srtcontrole_key,
cd.ins_discipline_omschrijving,
isc.ins_srtcontrole_omschrijving,
cd.ins_discipline_key,
isc.ins_srtcontrole_key
FROM ctr_discipline cd,
ins_srtcontrole isc
WHERE cd.ins_discipline_key = isc.ctr_discipline_key
UNION
SELECT 'T' niveau,
NULL ctr_srtinstallatie_key,
NULL discipline_oms,
NULL srtcontrole_oms,
NULL ins_discipline_key,
NULL ins_srtcontrole_key
FROM DUAL;
CREATE_VIEW(ctr_v_monthly_recurring_tasks, 0)
AS
-- Inspecties die dit jaar en volgend jaar nog uitgevoerd moeten worden.