-
Filter/Count zip code
Hi all,
I have a column of zip codes. I would like to filter by how many different zip codes there are. I have about 65,000 records, so who knows how many.
I'm using ACESS 2000, on XP.
Thanks
-
SELECT ZipCode, Count(*) as CountOfZip FROM tblTableName
GROUP BY ZipCode
Of course you will need to use the real name for your zip code field, and the real name of the table you are dealing with. Now, to find out how many different zip codes you are dealing with, see how many records this query produces, and that will be the number of zip codes you are dealing with.
-
Reading your question you want to select using zip codes eliminating duplicate zip codes not count how many different zio codes there are in the table.
To do this use the DISTINCT in your query as follows
SELECT DISTINCT ZipCode FROM tblTableName
You will need to change the code to suit your table and field name.
Allan
-
Many thx!
That did the trick! I really need to get in the DBA world.
-
Which "that" did the trick? Two separate solutions were presented.
-
Distinct
Golferguy,
I used the distinct command and it created a table that produced the unique zips.
I appreciate your help on this one.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|