Is there any way to explicitly state the order for WHERE conditions to take place? I realize that the query optimizer will look at all parts of the WHERE clause to determine the most efficient way to satisfy the query, as stated in these answers:
Does order of where clauses matter in SQL
SQL - Does the order of WHERE conditions matter?
However, is there no way to check for a condition that other conditions will rely on? One of the answers from those threads touches on what I'm after, but doesn't offer a solution:
select *
from INFORMATION_SCHEMA.TABLES
where ISNUMERIC(table_name) = 1 and CAST(table_name as int) <> 0
This can fail because the CAST can be evaluated before determining whether the table_name field is numeric (and therefore throw an error for invalid casting).
Surely there must be a way to achieve this?