The zipdistance( function calculates the distance between two zip codes.
This function has two parameters:
zip1 – first zip code
zip2 – second zip code
This function calculates the distance (in miles) between two zip codes.
zipdistance(91606,92648) ☞ 41.4173 zipdistance(91101, 01230) ☞ 2467.19
Although the result is displayed to several decimal points, the answer of course really isn’t that accurate. But it can be used to quickly select addresses that are within an approximate distance of each other. This example selects database records that are less than 50 miles (approximately) from downtown Los Angeles.
select zipdistance(90001,Zip) < 50
|10.0||New||New in this version.|