YFTH#86088 Ruimten zonder ruimtefunctie ontbreken in transportexport

svn path=/Database/trunk/; revision=66996
This commit is contained in:
Erik Groener
2024-11-12 09:57:23 +00:00
parent 5ca6d26a50
commit 811e9c6262

View File

@@ -339,7 +339,10 @@ SELECT l.alg_locatie_code Locatiecode
, r.alg_ruimte_bruto_vloeropp Vloeroppervlak
, pa.prs_afdeling_naam Afdelingscode
, ra.prs_ruimteafdeling_bezetting Bezetting
, s.prs_verhuurbaar ReserveerbareRuimte
, CASE WHEN rb.aantal IS NULL
THEN 0
ELSE 1
END ReserveerbareRuimte
, rd.ins_discipline_omschrijving Categorie
, rp.res_disc_params_expire_dagen Expiredagen
, rr.res_ruimte_prijs Prijs
@@ -365,6 +368,11 @@ SELECT l.alg_locatie_code Locatiecode
, res_disc_params rp
, res_ruimte_opstelling rro
, res_v_aanwezigopstelling ro
, (SELECT alg_ruimte_key
, COUNT(*) aantal
FROM res_v_aanwezigalg_ruimte
GROUP BY alg_ruimte_key
) rb
WHERE l.alg_locatie_key = g.alg_locatie_key
AND g.alg_gebouw_key = v.alg_gebouw_key
AND v.alg_verdieping_key = r.alg_verdieping_key
@@ -377,6 +385,7 @@ SELECT l.alg_locatie_code Locatiecode
AND rd.ins_discipline_key = rp.res_ins_discipline_key(+)
AND rr.res_ruimte_key = rro.res_ruimte_key(+)
AND rro.res_opstelling_key = ro.res_opstelling_key(+)
AND r.alg_ruimte_key = rb.alg_ruimte_key(+)
AND rro.res_ruimte_opstel_verwijder IS NULL
AND (g.alg_gebouw_vervaldatum IS NULL OR g.alg_gebouw_vervaldatum > TRUNC(SYSDATE))
AND (rr.res_ruimte_vervaldatum IS NULL OR rr.res_ruimte_vervaldatum > TRUNC(SYSDATE));