We are building a report where some value is compared with thresholds. Logic is
if value > lower_threshold and value < upper_threshold then PASS else FAIL
However, for some of the parameters upper_thresholds are set as NULL. Which essentially means there is no upper threshold and if value <= lower_threshold then only it will FAIL otherwise it will always be PASS. We are building queries using Oracle SQL. Since, comparison of any value with NULL will always return FALSE, report is not working as expected. One option is:
if value > lower_threshold and value < nvl(upper_threshold, 9999999999999999) then PASS else FAIL
This is not a good way. Is there any other option to achieve the same?