varesources
asked on
How do I make this query order by month: January, February, March....?
With the current query it orders the months alphabeticaly. How do I make it order correctly?
SELECT
DATENAME(mm,FilteredNew_application.new_effectivestartdate) as Month
,sum(FilteredNew_application.new_gp) as GP
,sum(FilteredNew_application.new_approvalamount) as Approval
,sum(FilteredNew_application.new_equiptmentcost) as Revenue
FROM
FilteredNew_application
WHERE
FilteredNew_application.new_primaryvendoridname LIKE N'Dell%'
AND FilteredNew_application.new_applicationstatusname = N'Vendors Paid'
AND FilteredNew_application.new_effectivestartdate >= N'02/01/2010 00:00:00'
Group by DATENAME(mm,FilteredNew_application.new_effectivestartdate)
Order by DATENAME(mm,FilteredNew_application.new_effectivestartdate)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER