PCHA#41213 View PCHA_V_TOTAAL_KORTING_OND aangepast

svn path=/Customer/trunk/; revision=34817
This commit is contained in:
Jordy Polman
2017-08-03 14:33:54 +00:00
parent 9b16e8e1cb
commit 081a669976

View File

@@ -1724,22 +1724,32 @@ END;
--Klant specifieke view voor het tonen van het totaal korting per kwartaal per onderwerp
CREATE OR REPLACE VIEW pcha_v_totaal_korting_ond
AS
CREATE OR REPLACE FORCE VIEW PCHA.PCHA_V_TOTAAL_KORTING_OND
(
INS_DISCIPLINE_OMSCHRIJVING,
ONDERWERP,
TOTAAL
)
AS
SELECT ins_discipline_omschrijving,
DECODE (
UPPER (ins_discipline_omschrijving),
'COMFORT', 'FTRC',
'FUNCTIONALITEIT', 'FTRC',
'TOEGANKELIJKHEID', 'FTRC',
'REPRESENTATIVITEIT', 'FTRC',
'VEILIGHEID ' || CHR (38) || ' GEZONDHEID', 'V' || CHR (38) || 'G',
'WET ' || CHR (38) || ' REGELGEVING', 'W' || CHR (38) || 'R',
'Dienst')
onderwerp, totaal
FROM pchx_v_monitoring m, mld_discipline d, mld_melding
where m.discipline_key = d.ins_discipline_key
AND totaal is not null
DECODE (
UPPER (ins_discipline_omschrijving),
'COMFORT', 'FTRC',
'FUNCTIONALITEIT', 'FTRC',
'TOEGANKELIJKHEID', 'FTRC',
'REPRESENTATIVITEIT', 'FTRC',
'VEILIGHEID ' || CHR (38) || ' GEZONDHEID', 'V'
|| CHR (38)
|| 'G',
'WET ' || CHR (38) || ' REGELGEVING', 'W' || CHR (38) || 'R',
'Dienst')
onderwerp,
totaal
FROM pchx_v_monitoring m, mld_discipline d, mld_melding a
WHERE m.discipline_key = d.ins_discipline_key
AND m.melding_key = a.mld_melding_key
AND totaal IS NOT NULL
AND totaal !=0
AND mld_melding_datum > ADD_MONTHS (SYSDATE, -3);