Suppose I have four conditions cond_a, cond_b, cond_c and cond_d. I need to introduce the following into the WHERE clause :
WHERE (cond_a AND cond_b) OR (cond_c AND cond_d)
The only way I have found to do this is as follows:
this produces the SQL
WHERE cond_a AND cond_b OR (1) AND cond_c AND cond_d
which is logically equivalent and works correctly, but is there a neater way to achieve the required result?
Thanks for any suggestions