[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mysql
Subject:    Alternate forms of given name, lookup table
From:       2wsxdr5 <2wsxdr5 () cox ! net>
Date:       2006-04-26 19:32:40
Message-ID: 444FCAD8.2030704 () cox ! net
[Download RAW message or body]

Does anyone know where I mind find a table to look up alternate forms of
a certain given name?  For example; if I give it Bob it gives me Robert
and if I give it Bill it gives me Will and William.  Or if I give it
either Dick, Rick or Richard it gives me back the other two.  Also, once
I have this lookup table and I am trying get Bob in my table A to match
with Robert in my table B what would the query look like.  Just to start
here is kind of what I have been doing so far...

SELECT a.FName a.MName, a.LName, a.Street, a.City, a.State, a.ZIP, a.Phone
FROM TableA as a, TableB as b
WHERE a.LName  = b.LName AND  LEFT(a.MName, 1) = b.MInitial AND a.ZIP =
b.ZIP
## the following will match names like Chris and Christopher.  I need to
replace this with something better.
(
(b.FName like concat(a.FName, '%') AND a.FName = a.FName) OR
(a.FName like concat(b.FName, '%') AND b.FName = b.FName)
)
ORDER BY a.LName, a.FName

-- 
Chris W
KE5GIX

Gift Giving Made Easy
Get the gifts you want &
give the gifts they want
One stop wish list for any gift,
from anywhere, for any occasion!
http://thewishzone.com



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=mysql@progressive-comp.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic