I have the following Case statements:
CASE
WHEN %scan(&rule_list, 1,#) AND a.RULEFLAG = "-" THEN "&RULE_ORDER"
WHEN %scan(&rule_list, 2,#) AND a.RULEFLAG = "-" THEN "&RULE_ORDER"
END as RuleFlag
The resolution of %scan(&rule_list,1,#) may look like this:
A.ACTUAL_DLVRY_DATE IS NULL AND B.ACTUAL_DLVRY_DATE IS NOT NULL
My problem is that I need it to resolve with parentheses around the value. Like this:
(A.ACTUAL_DLVRY_DATE IS NULL AND B.ACTUAL_DLVRY_DATE IS NOT NULL)
Any help would be greatly appreciated.