why not just do that string manipulation in the original query? On 8/1/07, Brad Wood <[EMAIL PROTECTED]> wrote: > As far as I know it is not possible to do substring manipulation in a > query of queries. Unless CF8 changed something, I think your only > option is to loop manually over the result set and use mid() > > ~Brad > > -----Original Message----- > From: Dae [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 01, 2007 12:17 PM > To: CF-Talk > Subject: cfquery error, help please. > > 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.. > > > > >
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285107 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

