Hi All,

We've got a database (legacy, running MySQL 4.1.22 Standard) of
constituents.  We want to search through it for duplicates, and I've found
that a good way to generate a list of potential duplicate addresses is to
look for addresses that have matching street numbers, zipcodes, and last
names.  For instance, consider the following two records:

John Smith, 123 E Easy St, Springfield, IL 12345
John Smith, 123 East Easy Street, Springfield, IL 12345

They're not a letter for letter match, but if you just compare the last
names ("smith"), and the numeric components of the address ("123" and
"12345"), they would match.

I am wondering, is there a way to search through a table like this (all
fields are varchar):
fname, lname, address, city, state, zip

Using regular expressions, to show any records which match another record on
lastname, street number, and zip?  I could do this easily enough in a client
language like PHP, C#, Java, etc., but I was hoping I could do it in SQL
directly.  Is this possible?

If it's possible, but only with MySQL 5 or better, I could probably export
the database, and import it into a newer version of MySQL.  But it would
naturally be nicest if we can do on the existing server.

Suggestions?

  -Josh
-- 
View this message in context: 
http://www.nabble.com/Regular-Expressions-in-MySQL----how-to-show-addresses-that-have-the-same-numbers--tp15923015p15923015.html
Sent from the MySQL - General mailing list archive at Nabble.com.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to