WHERE without using CASE

M

Mark B

I'm trying to edit a Filter in Outlook and it has a sort of SQL syntax. The
only thing is I don't know if it accepts CASE statements -- it's giving a
'SQL parsing' error.

Is there another simple SQL way of doing this WHERE clause without using
case (e.g. using AND or OR)?:

WHERE (CASE WHEN (MyField1 IS NULL) THEN (MyField2) ELSE (MyField1))>1













My Reference:

(CASE WHEN
("http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/MyField1"
IS NULL) THEN
("http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/MyField2")
ELSE
("http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/MyField1"))>1
 
M

Mark B

Think I may have it:

WHERE

(MyField1>1 AND MyField2 IS NULL)

OR

((MyField2 IS NOT NULL) AND MyField2>1)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top