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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

word like '%abc%' 1

Status
Not open for further replies.

woutput

Programmer
May 12, 2006
2
NL
Hello there,

I have a huge (200.000+) list of words (table called WORDS, 1 column called WORD)
I use this query:

Query = "SELECT * FROM WORDS WHERE WORD LIKE '%" & INFOSTRING & "%'"

to search for a WORD containing INFOSTRING.
But I want to search for a INFOSTRING containing WORD, how do I do that?
 
You wanted this ?
Query = "SELECT * FROM WORDS WHERE '" & INFOSTRING & "' LIKE '%' || WORD || '%'"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks!

Query = "SELECT * FROM WORDS WHERE '" & INFOSTRING & "' LIKE '%' || WORD || '%'"

is the solution to my problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top