Change the GROUP BY from
To: ms_access_professionals@yahoogroups.com
From: MS_Access_Professionals@yahoogroups.com
Date: Tue, 14 Jun 2016 06:47:42 -0500
Subject: RE: [MS_AccessPros] RE: sql to show count by month
GROUP BY DatePart("m",[Date approved]) & "-" & DatePart("yyyy",[Date approved]);
TO:
GROUP BY DatePart("yyyy",[Date approved]) & "-" & DatePart("mm",[Date approved]);
GROUP BY DatePart("yyyy",[Date approved]) & "-" & DatePart("mm",[Date approved]);
hth,
Steve
To: ms_access_professionals@yahoogroups.com
From: MS_Access_Professionals@yahoogroups.com
Date: Tue, 14 Jun 2016 06:47:42 -0500
Subject: RE: [MS_AccessPros] RE: sql to show count by month
Liz,
As John implies, never assume records will appear in a particular order (even with a group by).
I don't believe it is possible to order by a field that isn't in the select clause particularly when the query is a totals query. I would stick with answer number 1.
Regards,
Duane
To: MS_Access_Professionals@yahoogroups.com
From: MS_Access_Professionals@yahoogroups.com
Date: Tue, 14 Jun 2016 10:53:52 +0200
Subject: Re: [MS_AccessPros] RE: sql to show count by month
Or just
Liz-
This email (and all attachments) is for the sole use of the intended recipient(s) and may contain privileged and/or proprietary information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
As John implies, never assume records will appear in a particular order (even with a group by).
I don't believe it is possible to order by a field that isn't in the select clause particularly when the query is a totals query. I would stick with answer number 1.
Regards,
Duane
To: MS_Access_Professionals@yahoogroups.com
From: MS_Access_Professionals@yahoogroups.com
Date: Tue, 14 Jun 2016 10:53:52 +0200
Subject: Re: [MS_AccessPros] RE: sql to show count by month
Or just
ORDER BY [Date approved];
John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
(Paris, France)
On Jun 14, 2016, at 10:26 AM, John Viescas JohnV@msn.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
Liz-
Try adding:
ORDER BY Year([Date approved]), Month([Date approved])
John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
(Paris, France)
On Jun 14, 2016, at 12:43 AM, Liz Ravenwood liz_ravenwood@beaerospace.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
This email (and all attachments) is for the sole use of the intended recipient(s) and may contain privileged and/or proprietary information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
__._,_.___
Posted by: Steve Conklin <stephenmconklin@hotmail.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (6) |
Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.
.
__,_._,___
Tidak ada komentar:
Posting Komentar