Tried this, but since it is not stored as a date but varchar, datepart will not work.
-----Original Message----- From: Mike Hughes [mailto:[EMAIL PROTECTED] Sent: Thursday, July 12, 2007 10:40 AM To: SQL Subject: Re: Sort by month Try In Selectstaement add DATEPART(dd, Birthdate) AS DayOfBirth"; OrderByStatement = "ORDER BY DayOfBirth" On 7/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I have a table with the month stored as January, February, > March.....etc. How do I write a query to order by month so that > January is first, Feb second and so on? I'm using SQL server and ColdFusion. > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create robust enterprise, web RIAs. Upgrade & integrate Adobe Coldfusion MX7 with Flex 2 http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/SQL/message.cfm/messageid:2869 Subscription: http://www.houseoffusion.com/groups/SQL/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.6
