I understand that there is no "Distinct Count" in Access and I can read and understand the logic of most things, but I am not that DB savvy and have been trying to get substrings to work or something to work, but can figure it out.
Here is a sample Table (called Data):
AuditID SevCode IP
--------------------------
----------
----------
-
10 Cat I x.x.x.12
10 Cat I x.x.x.35
10 Cat I x.x.x.109
10 Cat I x.x.x.198
2109 Cat II x.x.x.12
2109 Cat II x.x.x.49
2109 Cat II x.x.x.124
2109 Cat II x.x.x.93
493 Cat III x.x.x.35
493 Cat III x.x.x.49
493 Cat III x.x.x.143
679 Cat I x.x.x.93
679 Cat I x.x.x.143
4317 Cat III x.x.x.93
4317 Cat III x.x.x.104
I am trying to count the total number of Cat I's, II's and III's. The code I am using is either counting total distinct records based off of AuditID (this case = 5) or only shows me the the total of one of the Cat's but doesn't distinct them (this case = 6 Cat I).
What I would like to get spit out is:
Cat I = 2
Cat II = 1
Cat III = 2
Any ideas?
Thanks in advance!!!
Start Free Trial