And did you look up the names of those cities? 027HH is historic No City Massachusetts; 028HH is quaint little No City Rhode Island; 030HH is scenic No City, New Hampshire; 040HH is rustic No City Maine... Get the picture? I don't know why they do it, but for some reason they assign these ZIPs to bodies of water. Nobody lives there. On Mar 20, 2009, at 5:03 PM, Stockly, Ed wrote: >>>> set aZip to aZip div 100 > > I was all set to use that until I saw a few dozen zips in the data > with > letters: > > 027HH MA > 028HH RI > 030HH NH > 040HH ME > > So I'll do something like this: > > set aZip to "027HH" > try > set myZip to aZip div 10 > on error > set myZip to ((characters 1 thru 3 of aZip) as text) as integer > end try > > >> There are 42 five-digit ZIP codes that cross state lines. The >> code should > probably flag those somehow. > > Wouldn't you know it, in the first set of live data they're using, > one of > those zip codes appears. I'm still hoping I can make this work > efficiently > with pure applescript. > >>> In those 42 cases, surely the Post Office itself doesn't straddle >>> a state > boundary. Why not use the state in which the Post Office building > sits? For > example, 99362's building is in Walla Walla, Washington, though it > serves some > rural areas in Oregon. One could additionally flag it as a dual- > state zip code, > if desired. > > These are for real estate listings, so they'll want to make sure > they have > the state the property is located in, and that's particularly > important in > border areas, where it seems that most of these shared zips appear. > > ES >