The DB is Oracle. What worked was more like: WHERE TO_CHAR(My_Date,'MM/YY') = '08/03'
Thanks! >From: "J E VanOver" <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: CF-Talk <[EMAIL PROTECTED]> >Subject: RE: SQL - Selecting a Month >Date: Wed, 3 Sep 2003 16:00:16 -0700 > >Yep, should work. SQL Server Books Online says: > >MONTH >Returns an integer that represents the month part of a specified date. > >Syntax >MONTH ( date ) > > >Looks the same to me! > > >-----Original Message----- >From: B G [mailto:[EMAIL PROTECTED] >Sent: Wednesday, September 03, 2003 1:57 PM >To: CF-Talk >Subject: OT: SQL - Selecting a Month > > >I know there is an easy answer to this that's escaping me at the moment. > >CF has a function Month() which will pull the number of the month out of a >date. Is there a similar function to use in a SELECT statement that works >the same way? > >Here's what I want: > >SELECT My_Date >FROM All_Dates >WHERE Month(My_Date) = 8 > >Returns all entires from All_Dates that are August. Easy? > >Thanks! > >BG > >_________________________________________________________________ >MSN 8: Get 6 months for $9.95/month http://join.msn.com/?page=dept/dialup > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Get the mailserver that powers this list at http://www.coolfusion.com

