Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

combining Multiple Likes

Status
Not open for further replies.

newfrontiers

Programmer
Oct 17, 2001
134
US
I have been searching Tek-Tips for an answer to this but I am probably entering the wrong key words. Any help is appreciated.

I have a query that requires numerous Like criteria. Basically, it takes a listing of numbers (can be as many as 50) and then queries. Do I need to do this through Like "123*" OR like "456*"...? Or is there a command such as in list ("123*","456*")?

Because there are three other pieces of criteria you can imagine how unwieldy the query gets by using the OR.

Thanks for your help.


 
Hi,

Since they are ALL 3 bytes, hou 'bout this?...
Code:
Where Left([TheField], 3) IN ('123,'456','789',....)


Skip,

[glasses] [red]Be advised:[/red] Researchers have found another Descartes trueism, "Cogito ergo spud."
"I think; therefore, I YAM!
[tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top