Group Query

T

TotallyConfused

I would like someone to please help me with this please. I have to count and
identify groups by an id that consists of 8 characters. The characters can
consist of a combination of letters and numbers. How I need to group is the
id can be ???????A. However, I need to eliminate the ids with ???????A only.
I need to count and group ids that are in a group by a group meaning
???????A, ???????B, ???????C etc. the first 7 characters are all the same
except the last character changes Therefore, the groups would be the first
seven characters would all be the same. The last character would change
consecutively. How can I group this to count how many groups there are? I
hope I made sense and someone can please help me write criteria. Thank you.
 
A

Allen Browne

In query design view, enter this in the Field row:
Left([F1], 7)

Substitute your field name for F1.

Depress the Total icon on the toolbar.
Access adds a Total row to the grid.
Accept Group By under this field.

Drag the field into the grid grid again (another column of Field row.)
This time, choose Count in the Total row.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
news:[email protected]...
 
T

TotallyConfused

Thank you that worked perfectly for most of my list. However, I have found
another type of id where the characters are the same the first 4 or 5
characters are the same and characters 6 and 7 are different and then
character 8 is the same. That would be another query but how do I write
that? Thank you in advance for all your help.

Allen Browne said:
In query design view, enter this in the Field row:
Left([F1], 7)

Substitute your field name for F1.

Depress the Total icon on the toolbar.
Access adds a Total row to the grid.
Accept Group By under this field.

Drag the field into the grid grid again (another column of Field row.)
This time, choose Count in the Total row.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
I would like someone to please help me with this please. I have to count
and
identify groups by an id that consists of 8 characters. The characters
can
consist of a combination of letters and numbers. How I need to group is
the
id can be ???????A. However, I need to eliminate the ids with ???????A
only.
I need to count and group ids that are in a group by a group meaning
???????A, ???????B, ???????C etc. the first 7 characters are all the same
except the last character changes Therefore, the groups would be the
first
seven characters would all be the same. The last character would change
consecutively. How can I group this to count how many groups there are?
I
hope I made sense and someone can please help me write criteria. Thank
you.
 

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