Unanswered: WHERE (CASE WHEN THEN ELSE) in a query
How do I express the where block in the title above? I have an SQL SELECT I am trying to convert to an MS Access query. One of the filters of the WHERE clause of my query has the following pattern (in bold):
| [AND CRITERIA_M]
AND (CASE WHEN TableA.ColumnX IS NULL
END = @MyVar)
| [AND CRITERIA_N]
Also it would be great if could point me out how to pass a variable to a Query.
Any help greatly appreciated!
Teddy, Thanks! Boy I missed that one. I have used IIF() in the Select clause, but sure did not see how it would work the way the CASE was written. I've played with that and now have learned something.
Played both Saturday and Sunday, though if you could have cut down on the breeze it would have been nicer (it was cool enough that the breeze made it cold). Supposed to be in the 70's tomorrow, and I'm taking a tech out as a thank you for fixing my mom's laptop. Should be gorgeous!
Hit them long, straight, and seldom! My left knee has been acting up so I have not been abole to play in a couple of weeks. I'm planning on trying tomorrow though. Still waiting for the phone call when you are in the area.