Link to home
Start Free TrialLog in
Avatar of billb1057
billb1057Flag for United States of America

asked on

Access 2003 - find multiple strings within single string

I have a table with a single column of text strings (of sentences).
I can query for a single word with =Instr([textfield],"searchstring")  -- that gives a positive integer if found.
Now, I have a table with 20 "searchstrings".
Can I query that table somehow to find any instance of any of those strings in the target?
Then also, can another query find every instance of all the strings.

I guess the tables have to be joined somehow (???) or perhaps a subquery can be the criteria and use OR for each.

For a little more detail, if it helps -- the responses survey comments.  I have found the top 20 significant words used.  Now I can find which comments those words are found in.

Thanks for your help.
Avatar of Kent Dyer
Kent Dyer
Flag of United States of America image

Have a look here..

http://www.mvps.org/access/tables/index.html

HTH,

Kent
ok, you have one table with one column and it has about 20 rows right? each row represents what you want to search for
what is the target, is it another table?

perhaps something like this

select * from searchtable
where checkfield in (select searchstring from mysearchtagstable)

its a like *searchstring* type query I believe.

I don't know the answer personally because you can't have;

<<<<<<<<<< where checkfield like in (select "*" & searchstring & "*" from mysearchtagstable)       >>>>>>>>>>>>

I do want to know what the solution is though, so I am monitoring
ASKER CERTIFIED SOLUTION
Avatar of rockiroads
rockiroads
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of billb1057

ASKER

Works perfectly, thanks rockiroads!
no probs