UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Group By    
 
   
Tim
post Dec 14 2005, 07:57 AM
Post #1

UtterAccess Addict
Posts: 230
From: London



Hi,

I have got Total sale and Date controls. Date has got 1/Feb/2005 format.
My question is how can I make a query which will group by month such as

Total Month
2423 Jan
Feb
etc etc. ?

Thanks
Tin
Go to the top of the page
 
+
truittb
post Dec 14 2005, 08:01 AM
Post #2

Retired Moderator
Posts: 13,544
From: Texas (Is there anywhere else?)



Date and Month are reserved word in Access and should not be used as object names. Also avoid spaces and special characters in object names.

Select Sum(TotalSale) as Total, Format(YourDate,"mmm") as YourMonth
From YourTable
Group By Format(YourDate,"mmm")
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 20th May 2013 - 10:06 PM