G
Guest
How do I display the details of each record if the count of each
ExceptionType is greater than, let say 3, within a certain period? I would
like to know the reason for each exception if the total number of exceptions
within a period is greater than 3. Here is the SQL:
SELECT DISTINCT Name,Count(TypeID) AS Num
FROM tblException
WHERE PostDate>=DateAdd('d',-190,Date())
GROUP BY Name,TypeID
HAVING Count(TypeID)>=3
But this only gives me the total count. If I add Reason to the query, I get
no record at all. Do I need multiple queries / nested queries, or change my
GROUP BY / HAVING?
ExceptionType is greater than, let say 3, within a certain period? I would
like to know the reason for each exception if the total number of exceptions
within a period is greater than 3. Here is the SQL:
SELECT DISTINCT Name,Count(TypeID) AS Num
FROM tblException
WHERE PostDate>=DateAdd('d',-190,Date())
GROUP BY Name,TypeID
HAVING Count(TypeID)>=3
But this only gives me the total count. If I add Reason to the query, I get
no record at all. Do I need multiple queries / nested queries, or change my
GROUP BY / HAVING?