I\'m doing some search, where users are choosing in dropdown some clauses. When they leave some box empty, I want query to ignore clause. I know CASE, and best I thought of
You can simplify to:
WHERE a.Country = COALESCE(NULLIF(@Country,0), a.Country);