Can I query to find equal zip codes?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to create a query that will count zip codes where all five
numbers match and if not test to see if first three numbers match and count
them.
 
What you are trying to do is illogical. If all five numbers match, then of
course the first three numbers will match. You need to define specifically
what you want, a count of the zipcodes where all five numbers match OR a
count of the zipcodes where the first three numbers match.
 
I need to separate the ones in which all five numbers match before I count
the ones in which the first three numbers match.
Once I count all the ones in which all five numbers match, can I then count
what is left in the table in which the first three numbers match?
 
1. Go to the database window, go to queries, click New and run the Find
Duplicates Query Wizard. This will give you a list of the zipcodes where you
have more than one in which all five characters match and the number of
duplicates of each of these zipcodes.

2A. Create a query based on the table with the zipcodes. Include the
zipcode field and enter the following in a blank field in the query:
ThreeChars:Left([Zipcode],3)
2B. Again go to the database window, go to queries, click New and run the
Find Unmatched Query Wizard.Follow the directions to find the zipcodes in
the your table that are not in the query in 1.
2C. Go to the database window, go to queries, click New and run the Find
Duplicates Query Wizard on the query in 2B.
 
Back
Top