How do you group and count ID's with decimals

  • Thread starter Gabe Portillo via AccessMonster.com
  • Start date
G

Gabe Portillo via AccessMonster.com

I have a DBA, where I want to group and query all records by the ID's, and
count the frequency of the record by its whole number. For example my DBA
looks like this:

ID Name Issue Email etc...
1.1
1.2
1.3
2.1
2.2

I want to see how many #1's I have and so on. Can someone please advise if
this is possible? If you need more info let me know. Thx, GP
 
D

Duane Hookom

I see 5 #1's. Would this be a correct number? If not, you might want to be
more specific.
 
G

Gabe Portillo via AccessMonster.com

Sorry, looking for the whole number count (1, 2, 3, etc..) not with the
decimal, such as:

1.1
1.2
1.3

The above example I would like to be counted as 3 record entries for the ID
#1. How do I do this?
 
D

Duane Hookom

SELECT Left([YourField], Instr([YourField],".")) as Num, Count(*) as NumOf
FROM tblYourTable
GROUP BY Left([YourField], Instr([YourField],".")) ;
 

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