I have a need to replace NULL values with 0 in order to operate on them further down the line. I know that this can be done using CASE WHEN and ISNULL, but am running into problems because my ELSE output involves a PU_SUM function:
WHEN ISNULL (PU_SUM(VBAP,“LIPS”.“LFIMG”)) = 1
ELSE PU_SUM(VBAP,“LIPS”.“LFIMG”) * “VBAP”.“UMZIZ” * 1.0
This results in an error: “Operator requirements are not met Operator ‘CASE’ is not compatible with cases of type: STRING and FLOAT.”
I believe this is where a DOMAIN_TABLE application would come into play, but don’t really understand how that would apply here, and would love to understand conceptually why PU functions cannot work in CASE WHEN statements.
Thanks for any help the team can provide.