FSN#32078 RES: activiteit x categorie niet verwijderd bij verwijderen activiteit
svn path=/Database/trunk/; revision=26324
This commit is contained in:
@@ -106,7 +106,7 @@ BEGIN
|
||||
AND :old.ins_discipline_verwijder IS NULL
|
||||
AND :new.ins_discipline_module = 'RES')
|
||||
THEN
|
||||
DELETE_CHILDREN(res_activiteitdiscipline, res_discipline_key);
|
||||
BEGIN DELETE FROM res_activiteitdiscipline WHERE res_activiteitdiscipline.res_discipline_key = :new.ins_discipline_key; END;
|
||||
END IF;
|
||||
|
||||
|
||||
|
||||
@@ -297,6 +297,29 @@ ALTER TABLE ins_deel ADD
|
||||
NUMBER(10)
|
||||
CONSTRAINT ins_r_prs_perslid_key_beh REFERENCES prs_perslid (prs_perslid_key);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////// FSN#32078
|
||||
DELETE FROM res_activiteitdiscipline
|
||||
WHERE res_discipline_key IN
|
||||
(SELECT ins_discipline_key
|
||||
FROM ins_tab_discipline
|
||||
WHERE ins_discipline_module = 'RES'
|
||||
AND ins_discipline_verwijder IS NOT NULL
|
||||
);
|
||||
|
||||
DELETE FROM res_activiteitdiscipline
|
||||
WHERE res_activiteit_key IN
|
||||
(SELECT res_activiteit_key
|
||||
FROM res_activiteit
|
||||
WHERE res_activiteit_verwijder IS NOT NULL
|
||||
)
|
||||
AND NOT EXISTS
|
||||
(SELECT 'x'
|
||||
FROM res_v_aanwezigrsv_ruimte
|
||||
WHERE res_activiteit_key in (select res_activiteit_key from res_activiteit where res_activiteit_verwijder is not null)
|
||||
AND res_rsv_ruimte_tot > SYSDATE-14 -- na 14 dagen niet meer klagen
|
||||
AND res_status_bo_key IN (2, 3, 4, 7)
|
||||
);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////// FSN#nnnnn
|
||||
/////////////////////////////////////////////////////////////////////////////////////////// GENERAL
|
||||
UPDATE alg_kenmerk SET alg_kenmerk_groep = 0 WHERE alg_kenmerk_groep IS NULL;
|
||||
|
||||
Reference in New Issue
Block a user