billb1057
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],"search string") -- 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.
I can query for a single word with =Instr([textfield],"search
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.
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)
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Works perfectly, thanks rockiroads!
no probs
http://www.mvps.org/access/tables/index.html
HTH,
Kent