I have a query that sales and it shows the month and year (field names are salemonth & saleyear) of the sale. Example return-set would be
January 2014
February 2014
March 2014
December 2014
January 2015
Now obviously I can't set it that way in my straight query as if I try to order by salemonth ASC it woudl show December, February, january, january, March. or even if I order by year ASC it still would not show in the actual calendar month order. How can I sort this result set to show in the order of an actual calendar?
One caveat their may be 0 sales for the month (november for example) I would still want this month/year shown in the query but have a 0 shown. Is this achievable?
Aucun commentaire:
Enregistrer un commentaire