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 care for the value for the street direction: N, S, E, W, or whether it is a suite, apartment, 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.
UPDATE
I think I am understanding the data a bit better. I hope I can get help for the following context.
OwnerID Addr_Nbr Address_A Address_B
3336223 2204138 11 Westbrook CIR 11 WESTBROOK CIR
3336223 2431628 9 Westbrook CIR 11 WESTBROOK CIR
3337465 2328720 4214 School RD 4214 SCHOOL RD
In that scenario, from the first two records the first one seem to be a match, but it is not, because that owner has more than one address, the third record is a good match because the address matches and the owner only has one address. How can I select only the records where the address matches, and there is only one address number for the owner? I hope this makes sense.
Thank you again