IVET#34864 aanpassing zalenzet rapport
svn path=/Customer/trunk/; revision=27708
This commit is contained in:
@@ -1767,23 +1767,21 @@ BEGIN
|
||||
COMMIT;
|
||||
END ivet_update_prs;
|
||||
/
|
||||
|
||||
/* Formatted on 27-2-2014 12:12:52 (QP5 v5.136.908.31019) */
|
||||
CREATE OR REPLACE VIEW IVET_V_RAP_ZALENZETTERS
|
||||
CREATE OR REPLACE VIEW ivet_v_rap_zalenzetters
|
||||
(
|
||||
HIDE_F_SORT_DATUM_TIJD_RUIMTE,
|
||||
HIDE_F_SORT_RES_NR,
|
||||
HIDE_F_SORT_CATEGORIE,
|
||||
FCLT_F_DATUM,
|
||||
RES_NR,
|
||||
BEGIN_EIND,
|
||||
TIJD,
|
||||
TIJD_VC,
|
||||
RUIMTE,
|
||||
DEELNEMERS,
|
||||
ACTIVITEIT_VOORZIENINGEN,
|
||||
BUDGETNUMMER,
|
||||
OPMERKING
|
||||
hide_f_sort_datum_tijd_ruimte,
|
||||
hide_f_sort_res_nr,
|
||||
hide_f_sort_categorie,
|
||||
fclt_f_datum,
|
||||
res_nr,
|
||||
begin_eind,
|
||||
tijd,
|
||||
tijd_vc,
|
||||
ruimte,
|
||||
deelnemers,
|
||||
activiteit_voorzieningen,
|
||||
budgetnummer,
|
||||
opmerking
|
||||
)
|
||||
AS
|
||||
SELECT TO_CHAR (res_geg.res_reservering_van, 'YYYY-MM-DD')
|
||||
@@ -2069,24 +2067,75 @@ AS
|
||||
rrr.res_rsv_ruimte_opmerking res_reservering_opm,
|
||||
(rrr.res_rsv_ruimte_tot - rrr.res_rsv_ruimte_van) * 24
|
||||
aantal,
|
||||
DECODE (rro.res_ruimte_key,
|
||||
341,
|
||||
'Wand labschool',
|
||||
581,
|
||||
'Wand interlokaal')
|
||||
res_voorziening,
|
||||
wand.voorziening Voorziening,
|
||||
NULL artikelnummer,
|
||||
NULL res_kostenplaats_nr,
|
||||
NULL res_next_van,
|
||||
1 wissel,
|
||||
1 service
|
||||
FROM res_v_aanwezigrsv_ruimte rrr, res_ruimte_opstelling rro
|
||||
FROM res_v_aanwezigrsv_ruimte rrr,
|
||||
res_ruimte_opstelling rro,
|
||||
(SELECT res_rsv_ruimte_key, voorziening
|
||||
FROM ( SELECT rro2.res_ruimte_key org,
|
||||
LAG(rro2.res_ruimte_key)
|
||||
OVER (
|
||||
ORDER BY
|
||||
rrr2.res_rsv_ruimte_van
|
||||
)
|
||||
prev,
|
||||
res_rsv_ruimte_key,
|
||||
'Wand ' || rr2.res_ruimte_nr
|
||||
|| DECODE (rro2.res_ruimte_key,
|
||||
341, ' Plaatsen',
|
||||
' Verwijderen')
|
||||
voorziening
|
||||
FROM res_v_aanwezigrsv_ruimte rrr2,
|
||||
res_ruimte_opstelling rro2,
|
||||
res_ruimte rr2
|
||||
WHERE rro2.res_ruimte_opstel_key =
|
||||
rrr2.res_ruimte_opstel_key
|
||||
AND rr2.res_ruimte_key =
|
||||
rro2.res_ruimte_key
|
||||
AND rro2.res_ruimte_key IN
|
||||
(283, 282, 341)
|
||||
ORDER BY rrr2.res_rsv_ruimte_van)
|
||||
WHERE ( (org = 341 AND prev IN (283, 282))
|
||||
OR (org IN (283, 282) AND prev = 341)
|
||||
OR (prev IS NULL))
|
||||
UNION
|
||||
SELECT res_rsv_ruimte_key, voorziening
|
||||
FROM ( SELECT rro2.res_ruimte_key org,
|
||||
LAG(rro2.res_ruimte_key)
|
||||
OVER (
|
||||
ORDER BY
|
||||
rrr2.res_rsv_ruimte_van
|
||||
)
|
||||
prev,
|
||||
res_rsv_ruimte_key,
|
||||
'Wand ' || rr2.res_ruimte_nr
|
||||
|| DECODE (rro2.res_ruimte_key,
|
||||
581, ' Plaatsen',
|
||||
' Verwijderen')
|
||||
voorziening
|
||||
FROM res_v_aanwezigrsv_ruimte rrr2,
|
||||
res_ruimte_opstelling rro2,
|
||||
res_ruimte rr2
|
||||
WHERE rro2.res_ruimte_opstel_key =
|
||||
rrr2.res_ruimte_opstel_key
|
||||
AND rr2.res_ruimte_key =
|
||||
rro2.res_ruimte_key
|
||||
AND rro2.res_ruimte_key IN
|
||||
(562, 563, 581)
|
||||
ORDER BY rrr2.res_rsv_ruimte_van)
|
||||
WHERE ( (org = 581 AND prev IN (563, 562))
|
||||
OR (org IN (563, 562) AND prev = 581)
|
||||
OR (prev IS NULL))) wand
|
||||
WHERE rrr.res_rsv_ruimte_dirtlevel = 0
|
||||
AND rrr.res_rsv_ruimte_van BETWEEN TRUNC (SYSDATE)
|
||||
AND TRUNC (SYSDATE + 5)
|
||||
AND rro.res_ruimte_key IN (341, 581)
|
||||
AND rro.res_ruimte_opstel_key =
|
||||
rrr.res_ruimte_opstel_key
|
||||
AND rrr.res_rsv_ruimte_key = wand.res_rsv_ruimte_key
|
||||
UNION ALL -- Begin/Wissel-Catering (bij ruimte en los)!
|
||||
SELECT '3C' res_type,
|
||||
rrr.res_rsv_ruimte_key,
|
||||
|
||||
Reference in New Issue
Block a user