Searching a field using a list of words in a table

  • Thread starter Thread starter Booost
  • Start date Start date
B

Booost

Im trying to search a field to find if it contains a word from a list i
have that has about 1000 entries in a table.

I can do single word searches with the instr and like but etc, but i
cant figure out how to use the instring search with a list of words
from a table.

Any ideas out there ?
 
Booost said:
Im trying to search a field to find if it contains a word from a list i
have that has about 1000 entries in a table.

I can do single word searches with the instr and like but etc, but i
cant figure out how to use the instring search with a list of words
from a table.

Any ideas out there ?

create a deliberate cartesian product between the two tables and then
use InStr?
just a crackhead thought...
 
To add to this, you can use Like such as

SELECT *, [Word]
FROM tblNoName, tblWords
WHERE [a field] Like "*" & [Word] & "*";
 
1. Create a query using both your main table and also your table of
keywords. The must be no line joining the 2 tables in the upper pane of
query design.

2. In the Criteria row under the field that contains the words, enter:
Like "*" & [tblKeyword].[Keyword] & "*"
substituting the name of the table and field in your table of keywords.

3. In the Properties box, set the Unique Records property to Yes, so the
record is not duplicated when it matches multiple keywords.

The results will be read-only.
 
Im trying to search a field to find if it contains a word from a list i
have that has about 1000 entries in a table.

I can do single word searches with the instr and like but etc, but i
cant figure out how to use the instring search with a list of words
from a table.

Any ideas out there ?

You can actually do a non-equi join in a (non-updateable) Cartesian
query:

SELECT <whatever>
FROM yourtable, wordlist
WHERE yourtable.textfield LIKE "*" & wordlist.word & "*";


John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top