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

word score

Status
Not open for further replies.

jwelch

Programmer
Joined
Feb 10, 2000
Messages
8
Location
US
Is there a way that I can create a query that will return a word approximate score such as: (refering to a table with first_name (text), last_name (text), ...<br>

<br>

A user could enter
 
Sorry, for some reason the last post got truncated.<br>
<br>
<br>
Using SQL with a ODBC source which is a Access2000 database...<br>
<br>
Is there a way that I can create a query that will return a word approximate score such as: (refering to a table with first_name (text), last_name (text), ...<br>
<br>
A user could enter &quot;Colinsworth&quot; as a parameter and the query would return all records that had an exact match of Colinsworth (which would be 0 records in this case with a score of 100%). <br>
<br>
Also, it would return the records of &quot;Collinsworth&quot; at a very high score and records of &quot;Collins&quot; at a medium score.<br>
<br>
I understand how to set up SQL queries using parameters, I just don't know how to score word approximatly.<br>
<br>
Thanks
 
What is the underlying result here.<br>
Sometimes in these forums its difficult to gather what you are really after.<br>
What purpose does it serve to know what percentage of someones name is in the whole group of last names?<br>
is this statisical anyalsys. <p> DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br>
 
The user would enter a first and last name or just one of the two, and the query would return records with a score of how close the fname and lname matched. <br>
<br>
If there is an exact match of first name and last name then the score would be 100%, if only first name or only last name then 50%, if the first or last name is approximately (a possible typo or misspell) then it would be give extra points and a higher score.<br>
<br>
Example:<br>
user entered: Ed Collins<br>
<br>
If there was a Ed Collins then I know how to find the exact record.<br>
<br>
if there wasn't an Ed Collins, then it would score the following names:<br>
Edward Collins = 75%<br>
Edward Smith = 25%<br>
Ed Collinsworth = 75%<br>
<br>
etc, <br>
<br>
this is so that you can enter a piece of someone's name or misspell it and still get a few records are are about (about is the command for this in oracle and there is a similar command in sql server, i believe).<br>

 
the underlying result would be a name search that would return the closest name if an exact name isn't found
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top