Is it possible to negate a where clause?
e.g.
DELETE * FROM table WHERE id != 2;
I was just solving this problem. If you use <> or is not in on a variable, that is null, it will result in false. So instead of <> 1, you must check it like this:
AND (isdelete is NULL or isdelete = 0)