[SOLVED] inserting between condition in sum condition


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.


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)

Leave a Reply

Your email address will not be published. Required fields are marked *