What's wrong with my SQL statement? <cfquery dbtype="query" name="calander"> SELECT LEFT(filename,3) as mnth, filename FROM dir_data where filename like '%calendar%' </cfquery>
This the LEFT is causing an error. Anyone know what might be the fix or problem? The error itself is: *Query Of Queries syntax error.* Encountered "LEFT. Incorrect Select List, Incorrect select column, BTW, what I'm doing is trying to grab the latest file based on the month in the file name. The naming convention for the files are Jan07Calander.doc I can't just take the max because when a file like Aug07Calander.doc is placed in the directory, it won't pick it up. Thanks.. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Check out the new features and enhancements in the latest product release - download the "What's New PDF" now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285076 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

