Hi everybody,
I'm trying to find a solution for the following problem: Each year (or within other reasonable period) we receive data from Assessor. We then have to process these data and put into main database. One of the processes, we're doing, is street standardization. We usually receive unparsed address from Assessor and a special application then called and performs parsing and standardizing of addresses. (My application, BTW). So far, so good. Now, obviously property address is unlikely to change, so if we done some work with addresses in the previous year, there is no need to repeat this work next year unless it's a new property or something was wrong in the database...
So, another application comes to play, called ADC (my manager calls it "Save the whales" :)). This application determines, which records we don't have to process, since they were already processed in the previous year.
We found cases, there address, received from assessor didn't correspond to address, we have in our database. There could be lots of weird reasons for that, but these cases should be processed.
So, here is the logic, I put in the method:
select SiteMstr
if SiteMstr.Prefcode<>"P"
locate for PropID = BldMstr.PropID and Prefcode = "P"
endif
scatter memvar
do case
case proper(left(m.Street,3))='Zzz'
case empty(m.StNum) and left(m.lcCompP1,1) $ "123456789"
case not isdigit(m.Street) and not upper(left(m.Street,at(" ",m.Street)-1)) $ m.lcCompP1
case m.StNum>0 and not alltrim(str(m.StNum)) $ m.lcCompP1
SiteMstr is a Live address and lcCompP1 is the incoming data.
Note the case number 3. Basically, I check, if the part of Street is in the unparsed street and if it is not, I mark this record as needed to review.
--------------------------------------
Here is a situation:
In file from Assessor we have Lily Pond Rd in unparsed street. In the Live database we have Lilly Pond Rd (note 2 ll in the middle). Live database has correct spelling, because addresses were checked against Postal office database. However, my program marks these records as needed to process (see case 3).
So, I have to somehow make into account difference in the spelling...
Hopefully I explained the problem well.
Do you have suggestions?
Thanks a lot in advance.
If it's not broken, fix it until it is.
My Blog