PCHA#41213 View PCHW_V_TOTAAL_KORTING_OND bijgewerkt

svn path=/Customer/trunk/; revision=34818
This commit is contained in:
Jordy Polman
2017-08-03 14:42:31 +00:00
parent 081a669976
commit c7e82e3aa8

View File

@@ -1542,22 +1542,32 @@ END;
/
--Klant specifieke view voor het tonen van het totaal aantal korting per onderwerp over 1 maand
CREATE OR REPLACE VIEW pchw_v_totaal_korting_ond
AS
CREATE OR REPLACE VIEW PCHW.PCHW_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, -1);