Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
mandyliftmeup
Starting Member
2 Posts |
Posted - 2010-10-08 : 00:47:28
|
| I'm trying to query something out that requires filtering by numerous WHERE NAME = A... essentially over 100 different criteria. Is there an easier way of doing this than typing them in individually?For example, can I bracket criterion like:WHERE NAME = (A, B, C)?Or is there another way?Or do I actually have to type everything in like:WHERE NAME = A OR NAME = B OR NAME = C.... etc. ?Thanks! |
|
|
Sachin.Nand
2937 Posts |
Posted - 2010-10-08 : 00:59:20
|
| WHERE NAME IN (A, B, C, D....100 criteria's).PBUH |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
mandyliftmeup
Starting Member
2 Posts |
Posted - 2010-10-08 : 01:20:15
|
| Thanks Guys! Didn't expect such fast responses. WHERE ___ IN worked beautifully. Tara, I'll keep that in mind for the future. I know it'll come in handy. I've always been an Excel guy so using databases to pull data is new to me. But thanks again for the tips! |
 |
|
|
|
|
|