Hopefully we have a few people who know a bit about mySQL here. I'm trying to get a few things to work and need a bit of help.
My first question would be about matching names. I have a table with two columns filled with names. Now I want to match these names. I already have a few matching algorithms, lets take the preinstalled soundex() as example here. Soundex turns strings that sound similar into identical number combinations, so the query
SELECT * FROM tablename WHERE SOUNDEX(namecolumn1)=SOUNDEX(namecolumn2);
compares the names and returns matches. But it only compares the entries line by line, so if two names are similar that are right next to each other that works fine, but if there are two similar (or identical) names in different lines they won't show up. Now how do I have to change the query so that each entry of column2 is compared to each entry in column1?
The name lists are quite long, so comparing each name from one list to the other column manaully won't work. Maybe something could be done by generating two more columns with the soundex() results?
edit: nevermind, I figured it out (well, someone else figured it out for me, actually)