Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Eliminating WHERE clauses with NOT
Message
De
04/11/2014 11:24:14
 
 
À
04/11/2014 11:12:33
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2012
Application:
Web
Divers
Thread ID:
01610458
Message ID:
01610468
Vues:
33
>It's boolean algebra
>
>
>NOT ( A and B) 
>
>is
>
>NOT(A) or NOT(B)
>
>
>
>So
>
>NOT (Client.NoStatus=@NoStatus AND Client.ModDate<@ModDate)
>
>NOT( Client.NoStatus=@NoStatus ) OR NOT(Client.ModDate<@ModDate)
>
>is
>(Client.NoStatus <> @NoStatus) OR ( Client.ModDate>= @ModDate )
>
>
>
>Also
>
>
>NOT ( A or B)
>is
>NOT(A) and NOT(B)
>
Thanks, this provides valuable information.

If you look at Message #1610467, you will see a more realistic command I have to execute.

Based on your reply, from that referred message, does this mean the second command, the one without the NOT clauses, wouldn't need any parentheses?
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform