RE: [PHP] soundex question
| From: | Matt Schroebel | Date: | Fri, 18 Apr 2003 12:20:40 +0000 |
| Subject: | RE: [PHP] soundex question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-144400@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Dan Rossi [mailto:daniel@electroteque.org]
> Sent: Thursday, April 17, 2003 9:57 PM
> To: Matt Schroebel; php-general@lists.php.net
> Subject: RE: [PHP] soundex question
>
>
> ?? thats exactly what i am trying to do
If the country is in the DB in any myriad of ways, I can't think of how
a LIKE would be built to select all of them without knowing how they are
in the db. You could go to all lengths to build a complex select, but it
seems to me that the problem is the data, and not the select statement
logic.
So, if I were in your situation, I would select the country field
distinct, sort on it, to get the list of the variations. Then I would
use UPDATE statements to correct all of the mis-spelled country names in
the DB.
If it's a ongoing issue and there are refreshes of dirty data from an
external source, then what I'd do is build a clean up script with all of
the cases known so far, run it each time a refresh came in, go back to
step 1 to make sure no new ones have snuck in, and revise the cleanup
script. Loop.