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!

Months query

Status
Not open for further replies.

peljo

Technical User
Mar 3, 2006
91
0
0
BG
On the basis of my query i have built a totals query as follows:
SELECT Sum(qryMargin.MarginInvoice) AS SumOfMarginInvoice, qryMargin.invoicedate
FROM qryMargin
GROUP BY qryMargin.invoicedate;

I want to break down the sum so obtained into months on the basis of the invoicedateand also to arrange them to be not in
alphabetical order but following the order of the months, e.g. january,february,march etc
Can you help me ?
 
A starting point:
Code:
SELECT Sum(MarginInvoice) AS SumOfMarginInvoice, Format(invoicedate, 'yyyy-mm') AS [Month]
FROM qryMargin
GROUP BY Format(invoicedate, 'yyyy-mm')
ORDER BY Format(invoicedate, 'yyyy-mm')

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top