Don't know how to do that. Can you give an example? -----Original Message----- From: Daniel Farmer [mailto:[EMAIL PROTECTED] Sent: Thursday, July 12, 2007 11:29 AM To: SQL Subject: RE: Sort by month
Why not just write your own function to return a proper date object based on the string of date you pass in? -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 12 July 2007 15:57 To: SQL Subject: RE: Sort by month 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 Web Applications With ColdFusion MX7 & Flex 2. Build powerful, scalable RIAs. Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS Archive: http://www.houseoffusion.com/groups/SQL/message.cfm/messageid:2871 Subscription: http://www.houseoffusion.com/groups/SQL/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.6
