Skip to Content
0
Former Member
Sep 23, 2010 at 01:49 PM

How to convert this statement to SAP's Open SQL?

364 Views

Hello,

Can someone please tell me how can I get an equivalent statement in Open SQL to the one below?

Unfortunately SAP's Open SQL doesn't allow CASESs and I can't have in in the WHERE clause because there are other fields I need to check and cannot eliminate a whole row if this particular field is 0.

SELECT AVG(CASE WHEN FIELD1 > 0 THEN FIELD1 ELSE NULL END)

FROM... WHERE...

Thanks