Notices

Go Back   FileFront Forums > Main Forums > Tech Discussion

Remember Me?

Tech Discussion
Discuss the latest in Tech, from gaming rigs & graphics cards, to phones & smart watches.
Don't forget Programming 101, and learn to code from our resident experts.

Reply
 
LinkBack Thread Tools Display Modes
Old February 7th, 2010   #1
The Bad
 
MrFancypants's Avatar
 
Join Date: December 7th, 2003
Location: Germany
Status: Available
16,165 posts, 808 likes.
Rep Power: 50
MrFancypants knows no limitMrFancypants knows no limitMrFancypants knows no limitMrFancypants knows no limitMrFancypants knows no limitMrFancypants knows no limitMrFancypants knows no limitMrFancypants knows no limitMrFancypants knows no limitMrFancypants knows no limitMrFancypants knows no limit
Default 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)


MrFancypants is offline   Reply With Quote
Old February 7th, 2010   #2
Modern Warfare
 
>Omen<'s Avatar
 
Join Date: January 1st, 2005
Status: Available
7,418 posts, 79 likes.
Rep Power: 31
>Omen< is almost as leet as Revenge>Omen< is almost as leet as Revenge>Omen< is almost as leet as Revenge>Omen< is almost as leet as Revenge>Omen< is almost as leet as Revenge>Omen< is almost as leet as Revenge>Omen< is almost as leet as Revenge>Omen< is almost as leet as Revenge>Omen< is almost as leet as Revenge
Default 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

http://img508.imageshack.us/img508/350/modernwarfarejn5.jpg

Last edited by >Omen<; February 7th, 2010 at 01:20 PM.
>Omen< is offline   Reply With Quote
Old February 9th, 2010   #3
Advanced Member
 
Rookie's Avatar
 
Join Date: May 3rd, 2005
Location: London, UK
Status: Lurking
5,200 posts, 22 likes.
Rep Power: 29
Rookie saves the day (again)Rookie saves the day (again)Rookie saves the day (again)Rookie saves the day (again)Rookie saves the day (again)Rookie saves the day (again)Rookie saves the day (again)Rookie saves the day (again)Rookie saves the day (again)Rookie saves the day (again)Rookie saves the day (again)
Default Re: SQL questions

I'm guessing you solved this using a self-join of some kind?


Rookie is offline   Reply With Quote
Old February 10th, 2010   #4
The Bad
 
MrFancypants's Avatar
 
Join Date: December 7th, 2003
Location: Germany
Status: Available
16,165 posts, 808 likes.
Rep Power: 50
MrFancypants knows no limitMrFancypants knows no limitMrFancypants knows no limitMrFancypants knows no limitMrFancypants knows no limitMrFancypants knows no limitMrFancypants knows no limitMrFancypants knows no limitMrFancypants knows no limitMrFancypants knows no limitMrFancypants knows no limit
Default Re: SQL questions

Quote:
Originally Posted by Rookie View Post
I'm guessing you solved this using a self-join of some kind?
Yep, there are apparently several methods to join a table with itself. I can imagine how joining two different tables on common elements works, but joining a table with itself seems a little weird.


MrFancypants is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
What Causes this SQL error? FileTrekker Tech Discussion 1 July 25th, 2004 12:28 AM


All times are GMT -7.







   
 





This site is part of the Defy Media Gaming network

The best serving of video game culture, since 2001. Whether you're looking for news, reviews, walkthroughs, or the biggest collection of PC gaming files on the planet, Game Front has you covered. We also make no illusions about gaming: it's supposed to be fun. Browse gaming galleries, humor lists, and honest, short-form reporting. Game on!

FileFront Forums - Terms of Service - Top
Theme Selection
Copyright © 2002-2016 Game Front. All rights reserved. Powered by vBulletin®
Copyright ©2000 - 2016, vBulletin Solutions, Inc.
Forum Theme by Danny King (FileTrekker), Sheepeep & Graeme(rs)
RSS Feed Widget by FeedWind