Hey all, I tend to explain to much so I’m going to just throw it out there.
I need to produce a Data Integrity report that lists the users of a separate database and the count of errors that they make, separated by error type.
Currently my query displays all the users who made errors, and the total errors they made. But I don’t want the total - I want to break this number down by the types of errors that are made.
I modified the SQL to make it easier to read. How can I take the below statement and make a few expressions that count up the specific values? The field I need to dissect is “Type Error” and a couple of examples of error types are “A1” and “B1”
I’ve seen it done with multiple queries joined together, but I’d like to avoid that if possible…
Thanks for your help,
~Kit.
I need to produce a Data Integrity report that lists the users of a separate database and the count of errors that they make, separated by error type.
Currently my query displays all the users who made errors, and the total errors they made. But I don’t want the total - I want to break this number down by the types of errors that are made.
I modified the SQL to make it easier to read. How can I take the below statement and make a few expressions that count up the specific values? The field I need to dissect is “Type Error” and a couple of examples of error types are “A1” and “B1”
Code:
[/FONT][/COLOR]
[COLOR=black][FONT=Verdana]SELECT DISTINCTROW [Errors Table].User, Count([Errors Table].[Type Error]) AS [Errors][/FONT][/COLOR]
[COLOR=black][FONT=Verdana]FROM [Errors Table] INNER JOIN [Workcenter Profiles] ON [Errors Table].PWC = [Workcenter Profiles].PWC[/FONT][/COLOR]
[COLOR=black][FONT=Verdana]WHERE ((([Errors Table].[Review Status])="Error Corrected")) OR ((([Errors Table].[Review Status])="Error Not Corrected")) OR ((([Errors Table].[Review Status])="Error Not Correctable "))[/FONT][/COLOR]
[COLOR=black][FONT=Verdana]GROUP BY [Errors Table].User[/FONT][/COLOR]
[COLOR=black][FONT=Verdana]ORDER BY [Errors Table].User;
I’ve seen it done with multiple queries joined together, but I’d like to avoid that if possible…
Thanks for your help,
~Kit.