Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Instead of OR in WHERE clause
Message
 
 
À
03/02/2014 23:12:51
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01593065
Message ID:
01593081
Vues:
44
This message has been marked as the solution to the initial question of the thread.
>>You don't need to use 1 condition per select. Split them in 2 equal parts.
>
>Ok, it would probably range within the same timeframe.
>
>>There is no other magic bullet, I think, except for the case when all conditions are for the same column. In this case you would use IN subselect.
>
>I thought that maybe SQL Server had something like WHERE InList(Table.PrimaryKey, 1, 2, 3).

Sure, it has IN subselect

WHERE PK IN (1,2,3)

This is what I meant by conditions on the same column.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform