Selasa, 23 Juni 2015

Re: [MS_AccessPros] Count total records between dates

 

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
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#));

This is returning total records for every status between the two dates,


Query1
CountOfService_Call_IDStatus_of_Call
8OPEN
1OPEN
12OPEN
7OPEN
10OPEN
5OPEN
7OPEN
4OPEN
12OPEN
6OPEN
8OPEN
5OPEN
12OPEN
10OPEN
8OPEN
11OPEN
4OPEN
1OPEN
12OPEN
6OPEN
7OPEN
3OPEN

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