Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Instead of OR in WHERE clause
Message
 
 
To
03/02/2014 23:12:51
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01593065
Message ID:
01593081
Views:
45
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform