General discussion

Locked

Access Zip Code Query Problem-Update multiple fields based on location

By hazwoper120 ·
I have a unique update query problem. Quite frequently I am importing new records into our database (10-15 K at a time). These records need to be "assigned" to a specific area (which we call regions). I have a table with all the defined regions (Region table). I also have another table with every zip code in the US (ZIP table). finally there is a 3rd table (Customers) that contains the "Region ID" field which needs to be updated with the result of comparing the first 2 tables.

Here is the breakdown:
1. The ZIP.Region ID field needs to be updated based in Zip Codes within 75 miles of center of city (Region.Region_Name). This table (ZIP) has multiple values (approx 3500) and the Region table has 65 different locations. Update the region.Region_ID field with match.
2. Query the ZIP Code database for matching zip codes (Zip.Region_ID) just updated in the Region .Region_ID field
3. Query matching zip codes in Zip.Region ID against the Customers Table (Customers.Zip) and update the Customers.Region_ID field to match in Zip.Region ID.

Any Help??

This conversation is currently closed to new comments.

0 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Back to Web Development Forum
0 total posts (Page 1 of 1)  

Related Forums