Jump to content

Recommended Posts

Hi,

 

I want to compare to tables A and B containing similar names.

If the names from B don't exist in the Table A than i wanna insert them in A.

 

Before i want to do that, want to make sure that it is a new Name and here comes tricky part... because the names can differ in many ways (e.g. misspelled, some could have middle names in either table...) ... so some LIKE "%name%" wont do it.

 

Are there more sophisticated approaches to determine if to names are the same?

I was thinking of the google function (DO u mean:....) if u misspelled a word. Are there scripts that would help me accomplish that?

 

Greetz

Plautzer

 

 

Link to comment
https://forums.phpfreaks.com/topic/181590-script-to-comapring-names/
Share on other sites

This is a non-deterministic problem. How is the computer supposed to know if Denial is a mis-spelling Daniel? It sounds like your database is poorly designed if it allows for insertion and update anomalies and if it allows for multiple values to be stored in the same field.

i think detecting an spelling error (missing a letter or switched letter ...) should be pretty general, isnt it? Dont want to invent the wheel there again ;)

 

Im thinking of comparing each letter and its position within the word and if its matching lets say over 95% its likely to be the same word (e.g. spelling e instead of an è).. in that case "Denial" and "Daniel" wouldnt be detected as the same word.

 

Do u know how google does that?

 

As for the database design... i have no other choice but to combine these tables thru matching names either manually or automatic thru a algotithm.. and i want to do as much automatic as possible.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.