Hi
I have a database that deals in logging errors within a company department. As part of this I want to add some trend analysis.
In the logging form a user can select two causing areas.
it is possible bonds might the team causing in any order or the team causing for both options.
What I need is to get the number of times an error category has been logged by this area which I have managed to do..... my problem is the query is returning duplicate categories what I need is the overall number for each catergory.
This is what is returned..... query below it.
BreachType CountOfBreachType
DPA 6
DPA 3
DPA - Info sent to the wrong address 1
DPA - Unauthorised release of info 1
DPA - Unauthorised release of info 1
Interdepartmental / Procedural delay 1
Query
SELECT tblBreach.BreachType, Count(tblBreach.BreachType) AS CountOfBreachType
FROM tblBreach
GROUP BY tblBreach.BreachType, tblBreach.AreaCaused1, tblBreach.AreaCaused2
HAVING (((tblBreach.AreaCaused1)="bonds")) OR (((tblBreach.AreaCaused2)="bonds"));
Hopefully you can see me problem, there shouldn't be any duplicates.....
Any help would be appreciated.
Thanks
Carl
I have a database that deals in logging errors within a company department. As part of this I want to add some trend analysis.
In the logging form a user can select two causing areas.
it is possible bonds might the team causing in any order or the team causing for both options.
What I need is to get the number of times an error category has been logged by this area which I have managed to do..... my problem is the query is returning duplicate categories what I need is the overall number for each catergory.
This is what is returned..... query below it.
BreachType CountOfBreachType
DPA 6
DPA 3
DPA - Info sent to the wrong address 1
DPA - Unauthorised release of info 1
DPA - Unauthorised release of info 1
Interdepartmental / Procedural delay 1
Query
SELECT tblBreach.BreachType, Count(tblBreach.BreachType) AS CountOfBreachType
FROM tblBreach
GROUP BY tblBreach.BreachType, tblBreach.AreaCaused1, tblBreach.AreaCaused2
HAVING (((tblBreach.AreaCaused1)="bonds")) OR (((tblBreach.AreaCaused2)="bonds"));
Hopefully you can see me problem, there shouldn't be any duplicates.....
Any help would be appreciated.
Thanks
Carl