P
Papa Jonah
I have a query that is based on a table with a bunch of yes/no check boxes.
I want the query to count the number of yes's for each of the y/n fields
and group them by organization. In theory it would look something like this:
on
time QA
Maint 6 2
Eng 3 4
Plan 12 1
Instead, what seems to be happening is the highest number for a given y/n
field is getting populated for each y/n field.
The above example would look like this:
time QA
Maint 6 6
Eng 4 4
Plan 12 12
Here is the SQL (AM is the organization field):
SELECT [zlookup AM].AM, Count(tblChanges.Addition) AS CountOfAddition,
Count(tblChanges.Deletion) AS CountOfDeletion, Count(tblChanges.Reassign) AS
CountOfReassign, Count(tblChanges.Reschedule) AS CountOfReschedule,
Count(tblChanges.ynIA) AS [Internal Assessments], Count(tblChanges.ynEA) AS
[Extenal Assessments], Count(tblChanges.ynshadow) AS Shadows,
Count(tblChanges.ynSA) AS [Self-Assessments]
FROM tblChanges INNER JOIN [zlookup AM] ON tblChanges.txtAM = [zlookup
AM].AMnum
GROUP BY [zlookup AM].AM;
TIA for any suggestions
Papa J
I want the query to count the number of yes's for each of the y/n fields
and group them by organization. In theory it would look something like this:
on
time QA
Maint 6 2
Eng 3 4
Plan 12 1
Instead, what seems to be happening is the highest number for a given y/n
field is getting populated for each y/n field.
The above example would look like this:
time QA
Maint 6 6
Eng 4 4
Plan 12 12
Here is the SQL (AM is the organization field):
SELECT [zlookup AM].AM, Count(tblChanges.Addition) AS CountOfAddition,
Count(tblChanges.Deletion) AS CountOfDeletion, Count(tblChanges.Reassign) AS
CountOfReassign, Count(tblChanges.Reschedule) AS CountOfReschedule,
Count(tblChanges.ynIA) AS [Internal Assessments], Count(tblChanges.ynEA) AS
[Extenal Assessments], Count(tblChanges.ynshadow) AS Shadows,
Count(tblChanges.ynSA) AS [Self-Assessments]
FROM tblChanges INNER JOIN [zlookup AM] ON tblChanges.txtAM = [zlookup
AM].AMnum
GROUP BY [zlookup AM].AM;
TIA for any suggestions
Papa J