You could try looking up SOUNDEX String comparison for vaguely similar values (i.e. Spears vs. Speres vs. Speares etc)
 
http://databases.about.com/od/development/l/aasoundex.htm
 
Under SOUNDEX in the mySQL docos they have interesting syntax
 
WHERE t1.name SOUNDS LIKE t2.name
 
http://dev.mysql.com/doc/refman/5.0/en/string-functions.html
 
You could also try left and right functions for getting intials etc
 
My two cents
Joel
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]On Behalf Of Tom MacKean
Sent: Wednesday, 28 June 2006 6:01 PM
To: [email protected]
Subject: [cfaussie] Re: Comparing names between databases

Good thinking! That will definitely help.
 
Thanks

 
On 6/28/06, Ryan Sabir <[EMAIL PROTECTED]> wrote:
 
You could use some SQL to compare just the surnames, stripped of any punctuation and spaces. Then run your function on the resultant data set. This should reduce the processing time somewhat.
 


From: [email protected] [mailto: [email protected]] On Behalf Of Tom MacKean
Sent: Wednesday, 28 June 2006 5:30 PM
To: [email protected]

Subject: [cfaussie] Re: Comparing names between databases

 
The thing is that the names come from two completely separate sources and one might be Harold Smith and one might be H J Smith.
 
I've written a function (120 lines long) that does a pretty good job of returning "yes, this is a match" or "no this is not a match". I can't see how you would recreate all the logic in an SQL query. 
 
Tom
 
On 6/28/06, Tom MacKean <[EMAIL PROTECTED] > wrote:
mySQL


On 6/28/06, Steve Onnis <[EMAIL PROTECTED] > wrote:
what database platform?
-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of Tom MacKean
Sent: Wednesday, June 28, 2006 5:16 PM
To: [email protected]
Subject: [cfaussie] Comparing names between databases

HI all,
 
I have two databases each containing names. I need to compare the two tables and identify anyone who its in both lists. There are 4000 names in one list and 1200 in the other.
 
Speed is not an issue - this is not a public site.
 
The only thing I can think of is to loop through one table and on each record, loop through the other table to find matches.
 
I would love to hear any thoughts about different ways of doing this.
 
Thanks,
 
Tom

--
IMPORTANT: This email is intended for the use of the individual addressee(s) named above and may contain information that is confidential privileged or unsuitable for overly sensitive persons with low self-esteem, no sense of humor or irrational religious beliefs. If you are not the intended recipient, any dissemination, distribution or copying of this email is not authorized (either explicitly or implicitly) and constitutes an irritating social fauxpas. No animals were harmed in the transmission of this email, although the mutt next door is living on borrowed time, let me tell you.







--
IMPORTANT: This email is intended for the use of the individual addressee(s) named above and may contain information that is confidential privileged or unsuitable for overly sensitive persons with low self-esteem, no sense of humor or irrational religious beliefs. If you are not the intended recipient, any dissemination, distribution or copying of this email is not authorized (either explicitly or implicitly) and constitutes an irritating social fauxpas. No animals were harmed in the transmission of this email, although the mutt next door is living on borrowed time, let me tell you.



--
IMPORTANT: This email is intended for the use of the individual addressee(s) named above and may contain information that is confidential privileged or unsuitable for overly sensitive persons with low self-esteem, no sense of humor or irrational religious beliefs. If you are not the intended recipient, any dissemination, distribution or copying of this email is not authorized (either explicitly or implicitly) and constitutes an irritating social fauxpas. No animals were harmed in the transmission of this email, although the mutt next door is living on borrowed time, let me tell you.




--
IMPORTANT: This email is intended for the use of the individual addressee(s) named above and may contain information that is confidential privileged or unsuitable for overly sensitive persons with low self-esteem, no sense of humor or irrational religious beliefs. If you are not the intended recipient, any dissemination, distribution or copying of this email is not authorized (either explicitly or implicitly) and constitutes an irritating social fauxpas. No animals were harmed in the transmission of this email, although the mutt next door is living on borrowed time, let me tell you.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cfaussie" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cfaussie
-~----------~----~----~----~------~----~------~--~---

Reply via email to