Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Avoiding parentheses
Message
De
22/09/2015 13:41:11
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Avoiding parentheses
Versions des environnements
SQL Server:
SQL Server 2012
Application:
Web
Divers
Thread ID:
01624934
Message ID:
01624934
Vues:
67
In this WHERE clause, I have parentheses:
WHERE Client.NoProvince=@NoProvince AND
 NOT (Client.Status<@Status AND Client.NoStatus=@NoStatus) AND
 NOT (Client.Status<@Status2 AND Client.NoStatus=@NoStatus2) AND
 NOT (Client.Status<@Status3 AND Client.NoStatus=@NoStatus3) AND
 NOT (Client.Status<@Status4 AND Client.NoStatus=@NoStatus4) AND
 Client.NoCountry IN (1,2,3,4,5,6,7) AND
 Client.FirstName LIKE @LXList1Clm_No
Would there be a way to avoid the parentheses? I see the execution is much smarter without those.
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform