Unix Technical Forum

Regular Expressions in MySQL -- how to show addresses that have thesame numbers?

This is a discussion on Regular Expressions in MySQL -- how to show addresses that have thesame numbers? within the MySQL General forum forums, part of the MySQL category; --> Hi All, We've got a database (legacy, running MySQL 4.1.22 Standard) of constituents. We want to search through it ...


Go Back   Unix Technical Forum > Database Server Software > MySQL > MySQL General forum

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-09-2008, 02:37 PM
Joshua Beall
 
Posts: n/a
Default Regular Expressions in MySQL -- how to show addresses that have thesame numbers?


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-Expres...p15923015.html
Sent from the MySQL - General mailing list archive at Nabble.com.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:35 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com