I have a Table that I want to query and group the records by Month. I have the following SQL -
SELECT (Month([DateOfSale])) AS [Month of Sale], [SALES DATABASE].ProductName, Sum([SALES DATABASE].QtySold) AS TotalQtySold, Sum([SALES DATABASE].TotalSales) AS TotalSalesPrice<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
FROM [SALES DATABASE]<o></o>
GROUP BY (Month([DateOfSale])), [SALES DATABASE].ProductName;
However, the above SQL gives the 'Months' in numbers, eg. 3, 4, 5, 6.
I need to add an SQL Statement that will give the Names of the Months instead of numbers and also add the year, e.g.
March 2011
April 2011
May 2011
etc.
Please help.
Thanks.
Kenny
SELECT (Month([DateOfSale])) AS [Month of Sale], [SALES DATABASE].ProductName, Sum([SALES DATABASE].QtySold) AS TotalQtySold, Sum([SALES DATABASE].TotalSales) AS TotalSalesPrice<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
FROM [SALES DATABASE]<o></o>
GROUP BY (Month([DateOfSale])), [SALES DATABASE].ProductName;
However, the above SQL gives the 'Months' in numbers, eg. 3, 4, 5, 6.
I need to add an SQL Statement that will give the Names of the Months instead of numbers and also add the year, e.g.
March 2011
April 2011
May 2011
etc.
Please help.
Thanks.
Kenny