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 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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. |