Discussions
CASE Statement Sum Help
Hello,
I need some help with a CASE Statement I'm writting because you cannot get the total weight of a package in an item fufillment or sales order. My syntax must be off becuase I get an invalid expression result.
CASE Statement:
sum(CASE WHEN {item.weight}*{quantity}<.81 AND {trackingnumbers} LIKE'%1ZT7%') THEN 1 ELSE 0 END
What I want the above statement to say is:
Sum all the line items weight on an item fufillment or sales order (by taking item weight times quantity) and when this is less than .81 AND the tracking number is like 1ZT7 then throw a 1 or 0.