Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Avoiding parentheses
Message
From
12/10/2015 13:08:53
 
 
To
29/09/2015 17:10:57
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2012
Application:
Web
Miscellaneous
Thread ID:
01624934
Message ID:
01625863
Views:
51
>if "NOT" it is the culprit
>
> WHERE Client.NoProvince=@NoProvince AND
>  (Client.Status>=@Status   OR Client.NoStatus<>@NoStatus)  AND
>  (Client.Status>=@Status2  OR Client.NoStatus<>@NoStatus2) AND
>  (Client.Status>=@Status3  OR Client.NoStatus<>@NoStatus3) AND
>  (Client.Status>=@Status4  OR Client.NoStatus<>@NoStatus4) AND
> Client.NoCountry IN (1,2,3,4,5,6,7) AND
> Client.FirstName LIKE @LXList1Clm_No
>
I verified the execution plan with the NOT approach and with yours. The execution plan is the same in both.

So, I do not think I will be able to simplify thing ups using that approach.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform