Standardize Rural Routes

Description

This command will standardize all possible scenarios for Rural Routes with and without box numbers. This command can be run prior to Validating records or after Validating records if you have many Undeliverable rural route addresses.

The Command At Work

Before Command After Command
Before running command
After running command

The Command

Copy this command, then paste it into the large text area of the command window:

Replace address with substr(strtran(upper(address),"RR","RR "), at("RR",upper(address))), address with iif(occur(" ",allt(address))>1,left(address,at(" ",address))+allt(str(val(substr(address,at(" ",address),1+at(" ",allt(substr(address,at(" ",address))))))))+" "+IIF(occur(" ",allt(address))>1,allt(substr(address,1+at(" ",address)+at(" ",allt(substr(address,at(" ",address)))))),""),left(address,at(" ",address))+allt(str(val(substr(address,at(" ",address)))))) for left(address,1)="0" or (LEFT(ALLT(address),2)="RR" and !"RR " $ upper(address))

After clicking RUN, the Rural Route addresses will be standardized properly, so AccuZIP6 will have a greater ability to validate them.