![]() |
SQL questions 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) :) |
Re: SQL questions I looked into mySQL once for something I don't now recall, and found the language structure to be hard to get too. I did however find a beginning tutorial that seems to address Structured Query Language though. Hope it helps. Beginning MySQL Tutorial There's also of course this, if you haven't asked here: http://forums.mysql.com/list.php?10 |
Re: SQL questions I'm guessing you solved this using a self-join of some kind? |
Re: SQL questions Quote:
|
| All times are GMT -7. |
Powered by vBulletin®
Copyright ©2000 - 2016, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.