Looks like you are mixing CF and Oracle processing. CreateODBCDate() is a CFML function, it is processed by CF so the data you pass to it must exist within CF, it can't be a database column. For this filtering you need to use Oracle date functions, not CF ones.
--- Ben -----Original Message----- From: M [mailto:[EMAIL PROTECTED] Sent: Monday, September 19, 2005 1:20 PM To: CF-Talk Subject: CreateOdbcDate(column - not variable) within a CFQuery Help!! This is not going well. Need to run a query returning all events that happened during the 0405 fiscal year (1 August 2004 - 31 July 2005). Realdate is the column in the events table storing the eventdate (format: dd-mmm-yyyy) in a date field in Oracle. Keep getting the error: Variable REALDATE is undefined. And I agree, realdate is not a variable, but that does not help me, as I need to convert the value stored in that column to an odbc date in order to do the 'between' comparison. Can anyone help me?? Please? Gettin' really frustrated!! And I need this to work! Thanks. Molly <cfquery name="findlastyear" datasource="enrichment"> select * from mydevelopmentevents where #createodbcdate(createdate (dateformat(realdate,'yyyy'),dateformat(realdate,'mm'),dateformat(realdate,' dd')))# Between #CreateODBCDate(begin)# and #CreateODBCDate(end)# order by realdate </cfquery> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:218622 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

