group by similar items

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

group by similar items

Post by magicrobotmonkey »

lets say i need to group by a field, say last name, where the data is user input and may be spelled funny - like smith and smithe being the same person or something. how can i do this in mysql?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

potentially regex, but that requires the spelling to be nearly the same... or using SOUNDEX, or the "SOUNDS LIKE" stuff.. http://dev.mysql.com/doc/mysql/en/String_functions.html
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

thanks - that worked somewhat - seems the clients are very bad spellers!
Post Reply