clean up city, state and zip

S

Song Su

I have downloaded a zipcode database and want to use it to find mistakes in
my table with 20,000 records. The zipcode database sample records as
follows: (ZipID is auto number primary)

City State Zip DefaultCity (Yes/No type:
Yes means default city; No means acceptable city)
Monterey Park CA 91754 Yes
Hacienda Heights CA 91745 Yes
Industry CA 91745 No
La Puente CA 91745 No

My table has student ID as primary key. Sample records as follows:


Monterey Park CA 91745 (wrong zip code, should be selected)
Monterey Pk CA 91754 (wrong city spelling, should be
selected)
Monterey Park LA 91754 (wrong state, should be selected)

however,

Industry CA 91745 (should NOT be selected as it's
acceptable city for that zipcode)
La Puente CA 91745 (same as above)

How to set up query (or queries) to select wrong zipcode, misspelled city or
state but not to select acceptable cities?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top