Why can't I use a boolean expression in a SQL CASE expression inside a WHERE clause?
I want to write a query with the following logic: If @fundKey is greater than 0, look for funds with a key matching @fundKey. Otherwise, look for funds with a key less than 1000000. If I were to write this logic in JavaScript it would be something like this: funds.filter(x => fundKey > 0 ?… Read More Why can't I use a boolean expression in a SQL CASE expression inside a WHERE clause?