Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query with counts for Chart in report

Status
Not open for further replies.

PeterDuthie

Programmer
Mar 14, 2001
29
0
0
GB
Hello Everyone. I need to get back two values from a query - 1. the total number of rows in a table and 2. the number of "incidents" which have been "signed off" (i.e.) dealt with successfully within 48 hrs. The two values are intended for a pie chart. Here's what I've got:

SELECT Count([T-incidents].[Signed off]) AS [Closed within 48 hrs]
FROM [T-incidents]
WHERE ([T-incidents].[Date of incident] + 2) >= [T-incidents].[Signed off];

How can I get the query to return the total number of incidents.

Thanks again to everyone who reads this.

(I'm cross posting this to the "General discussion" forum - If I'm not supposed to do this please let me know)

Cheers,
Peter
 
Looking at the date of the post, you probably know this already, but to count the total number of records, you just add a column with count(*)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top