Hey guys, I'm trying to run a fairly large where clause as part of a query in SQL Server 2005 Enterprise and finding some problems.
Here is an example of the kind of selection I am after:
Assume each instance of var is a column name and x is a valud
WHERE ((var=x or var=x) and var=x and var=x) or (var=x and var=x)
However SQL reformats this to the following:
WHERE (var=x or var=x) and var=x and var=x or var=x and var=x
Here is an example of the kind of selection I am after:
Assume each instance of var is a column name and x is a valud
WHERE ((var=x or var=x) and var=x and var=x) or (var=x and var=x)
However SQL reformats this to the following:
WHERE (var=x or var=x) and var=x and var=x or var=x and var=x