Issue
HAVING SUM (DECODE (account_number, '1', 1, 0)) > :p_num_to
I want to integrate between condition into sum condition, user will enter two variables :p_num_from
and p:_num_to
.
Solution
Simply add another condition with AND
HAVING (SUM (DECODE (account_number, '1', 1, 0)) <p_num_to)
AND (SUM (DECODE (account_number, '1', 1, 0))>p_num_from)
Answered By – Uri Goren
Answer Checked By – Gilberto Lyons (BugsFixing Admin)