• jc85 (5/29/2016)


    I have modified the query to execute successfully based on my limited knowledge.

    However it did not return correct output, can you advise which part of the query need to be changed?

    Thanks.

    You never use values from derived table columns Noisy and Telephony in outer query.

    Should it be this?

    SUM(CASE WHEN DT.lang = 'EN' THEN CASE a.report_item WHEN 'Noisy' THEN Noisy WHEN 'Telephony' THEN Telephony ELSE 0 END ELSE 0 END) EN,

    SUM(CASE WHEN DT.lang = 'BM' THEN CASE a.report_item WHEN 'Noisy' THEN Noisy WHEN 'Telephony' THEN Telephony ELSE 0 END ELSE 0 END) BM

    _____________
    Code for TallyGenerator