Re: Searching for best matches in string query
- From: "raskew via AccessMonster.com" <u28575@uwe>
- Date: Thu, 07 Aug 2008 02:41:53 GMT
You might want to take a look at this article describing the use of multiple
parameters. I've used this and it works well if searching on a number field,
but am still struggling if dealing with a text field. Nonetheless, it's an
interesting concept.
http://www.fabalou.com/Access/Queries/MultipleParameters.asp
Bob
John Spencer wrote:
One method would involve using a temp table that is populated with just
the words you are looking for. You would have to clear the records and
create new records each time you run the query.
TableFindWords with field TheWord
Bob
Jones
Roofing
Company
SELECT YourTable.Company, Count(YourTable.Company) as TimesFound
FROM YourTable INNER JOIN TableFindWords
ON YourTable.Company LIKE "*" & TableFindWords.TheWord & "*"
GROUP BY YourTable.Company
Order By Count(YourTable.Company), YourTable.Company
I'll have to ponder if there are other methods that you could use.
'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
I need to return a list of best/ranked matches from a field in a table. For[quoted text clipped - 8 lines]
example, if the user searches for "Bob Jones Roofing Company", I'd like it to
Thanks.
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/200808/1
.
- Follow-Ups:
- References:
- Searching for best matches in string query
- From: Wes
- Re: Searching for best matches in string query
- From: John Spencer
- Searching for best matches in string query
- Prev by Date: Re: Format right justify
- Next by Date: How to Join 2 queries
- Previous by thread: Re: Searching for best matches in string query
- Next by thread: Re: Searching for best matches in string query
- Index(es):
Relevant Pages
|