That was it. Thank you.
With Warm Regards,
Arthur D. Lorenzini
IT System Manager
Cheyenne River Housing Authority
Wk.(605)964-4265 Ext. 130
Fax (605)964-1070
"Anyone who claimed that old age had brought them patience was either lying or senile."
From: "John Viescas JohnV@msn.com [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com>
To: MS_Access_Professionals@yahoogroups.com
Sent: Tuesday, June 23, 2015 1:00 PM
Subject: Re: [MS_AccessPros] Count total records between dates
Arthur-
Like this:
SELECT Count(SV00300.Service_Call_ID) AS Total_WorkOrder, SV00300.Status_of_Call
FROM SV00300
FROM SV00300
WHERE (((SV00300.Date_of_Service_Call) Between #5/1/2015# And #5/31/2015#));
GROUP BY SV00300.Status_of_Call;John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
(Paris, France)
On Jun 23, 2015, at 7:31 PM, dbalorenzini@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
I am trying to get a total number of records per category between two dates but I am not doing something right. Here is what I have so far.
SELECT Count(SV00300.Service_Call_ID) AS Total_WorkOrder, SV00300.Status_of_Call
FROM SV00300
GROUP BY SV00300.Status_of_Call, SV00300.Date_of_Service_Call
HAVING (((SV00300.Date_of_Service_Call) Between #5/1/2015# And #5/31/2015#));
FROM SV00300
GROUP BY SV00300.Status_of_Call, SV00300.Date_of_Service_Call
HAVING (((SV00300.Date_of_Service_Call) Between #5/1/2015# And #5/31/2015#));
This is returning total records for every status between the two dates,
CountOfService_Call_ID | Status_of_Call |
---|---|
8 | OPEN |
1 | OPEN |
12 | OPEN |
7 | OPEN |
10 | OPEN |
5 | OPEN |
7 | OPEN |
4 | OPEN |
12 | OPEN |
6 | OPEN |
8 | OPEN |
5 | OPEN |
12 | OPEN |
10 | OPEN |
8 | OPEN |
11 | OPEN |
4 | OPEN |
1 | OPEN |
12 | OPEN |
6 | OPEN |
7 | OPEN |
3 | OPEN |
What I am trying to get is
Total Status
345 OPEN
Any ideas?
Thank you,
Arthur Lorenzini
Sioux Falls, SD
__._,_.___
Posted by: Art Lorenzini <dbalorenzini@yahoo.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (3) |
.
__,_._,___
Tidak ada komentar:
Posting Komentar