DJIN#52568 Toevoeging van verwijder-datumvelden aan [bes_v_allsrtinstallatie]

svn path=/Database/trunk/; revision=37331
This commit is contained in:
2018-03-12 15:08:20 +00:00
parent 255b880b2a
commit c6c8d57fb7

View File

@@ -464,7 +464,10 @@ CREATE_VIEW(bes_v_allsrtinstallatie, 0)
SRTDEEL_OMS,
BES_DISCIPLINE_KEY,
BES_SRTGROEP_KEY,
BES_SRTDEEL_KEY
BES_SRTDEEL_KEY,
BES_DISCIPLINE_VERWIJDER,
BES_SRTGROEP_VERWIJDER,
BES_SRTDEEL_VERWIJDER
)
AS
SELECT 'D',
@@ -474,17 +477,23 @@ AS
NULL srtdeel_oms,
bes_ID.ins_discipline_key,
NULL bes_srtgroep_key,
NULL bes_srtdeel_key
NULL bes_srtdeel_key,
bes_ID.ins_discipline_verwijder bes_discipline_verwijder,
NULL bes_srtgroep_verwijder,
NULL bes_srtdeel_verwijder
FROM bes_discipline bes_ID
UNION
SELECT 'G',
bes_SG.bes_srtgroep_key,
bes_ID.ins_discipline_omschrijving,
bes_SG.bes_srtgroep_omschrijving,
NULL,
NULL srtdeel_oms,
bes_ID.ins_discipline_key,
bes_SG.bes_srtgroep_key,
NULL
NULL bes_srtdeel_key,
bes_ID.ins_discipline_verwijder bes_discipline_verwijder,
bes_SG.bes_srtgroep_verwijder,
NULL bes_srtdeel_verwijder
FROM bes_discipline bes_ID, bes_srtgroep bes_SG
WHERE bes_ID.ins_discipline_key = bes_SG.ins_discipline_key
UNION
@@ -495,7 +504,10 @@ AS
bes_SD.bes_srtdeel_omschrijving,
bes_ID.ins_discipline_key,
bes_SG.bes_srtgroep_key,
bes_SD.bes_srtdeel_key
bes_SD.bes_srtdeel_key,
bes_ID.ins_discipline_verwijder bes_discipline_verwijder,
bes_SG.bes_srtgroep_verwijder,
bes_SD.bes_srtdeel_verwijder
FROM bes_discipline bes_ID, bes_srtgroep bes_SG, bes_srtdeel bes_SD
WHERE bes_SG.bes_srtgroep_key = bes_SD.bes_srtgroep_key
AND bes_ID.ins_discipline_key = bes_SG.ins_discipline_key;