Re: Removing duplicates - Mailing list pgsql-sql

From Andrew Perrin
Subject Re: Removing duplicates
Date
Msg-id Pine.LNX.4.21L1.0202261041350.7939-100000@nujoma.perrins
Whole thread Raw
In response to Removing duplicates  (Matthew Hagerty <matthew@brwholesale.com>)
List pgsql-sql
Zip code and then address seems reasonable to me. If you want to go
all-out, you could write a script that checks addresses against the USPS's
address system (www.usps.com/ncsc/lookups/lookup_zip+4.html) which will
return a standardized address. If you do that for your whole table you'll
end up being able to compare these standardized addresses against one
another, thereby even matching PO Box 123 vs. P.O. Box 123.

ap

----------------------------------------------------------------------
Andrew J Perrin - andrew_perrin@unc.edu - http://www.unc.edu/~aperrinAssistant Professor of Sociology, U of North
Carolina,Chapel Hill     269 Hamilton Hall, CB#3210, Chapel Hill, NC 27599-3210 USA
 


On Tue, 26 Feb 2002, Matthew Hagerty wrote:

> Greetings,
> 
> I have a customer database (name, address1, address2, city, state, zip) and 
> I need a query (or two) that will give me a mailing list with the least 
> amount of duplicates possible.  I know that precise matching is not 
> possible, i.e. "P.O. Box 123" will never match "PO Box 123" without some 
> data massaging, but if I can isolate even 50% of any duplicates, that would 
> help greatly.
> 
> Also, any suggestions on which parameters to check the duplicates for?  My 
> first thoughts were to make sure there were no two addresses the same in 
> the same zip code.  Any insight (or examples) would be greatly appreciated.
> 
> Thank you,
> Matthew
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> 



pgsql-sql by date:

Previous
From: Matthew Hagerty
Date:
Subject: Removing duplicates
Next
From: Tom Lane
Date:
Subject: Re: Timestamp output