June 14, 2018 at 10:19 am
Hi,
I would like to ask for help regarding how to do a partial string comparison of two address values stored in two separate columns.
I need to only identify the values that match even if the match is not 100%.
I do not need to look at the value of the street direction: N, S, E, W, or whether it is a Suite,Ste, Apartment, Apt, nor the type of street (Rd, St, Dr, Cr, etc)
Perhaps the requirement is fulfilled by only matching the first value, the house number.
An example would be:
Column1 Column2
17 Wickham CT 17 S WICKHAM CT # 2 << This is a partial match, include
6818 Chester DR 6801 CHESTER DR # A << This is a partial match, include
6301 Raymond RD 6301 RAYMOND RD << This is a full match, include
6217 Raymond RD PO BOX 45581 << This doesn't match, don't include
I have the query that retrieves everything, I just need to figure out how to filter the records that I don't need.
If I could get any help on this, it would be awesome.
Thank you.
June 14, 2018 at 11:36 am
The problem here is what; exactly; constitutes a match? Street Addresses have sub-elements like street number, road name, and unit number, and then there's the need to match on zip code because some folks in one zip code I know of will call the city one thing and others will call it something else, but the post office will usually know and only allow one instance of a delivery address to be in a given zip code, at least here in the US anyway... If you don't start separating your data into sub-elements for the address line, (and don't even mention address line 2), you're going to have a much harder time making a useful partial match.
Steve (aka sgmunson) 🙂 🙂 🙂
Rent Servers for Income (picks and shovels strategy)
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply