I know qofq doesn't do substring. I don't think it does any string
manipulation like replace.  You will probably need to loop over the
query and do it manually or do it in the database.


> -------- Original Message --------
> Subject: Query of Queries
> From: "Craigsell" <[EMAIL PROTECTED]>
> Date: Tue, September 02, 2008 11:45 am
> To: CF-Talk <cf-talk@houseoffusion.com>
> 
> I'm trying to use functions in a QoQ to parse out some text.  I have a 
> directory that has folders of images in it.  What I want is a simple QoQ that 
> will extract the directory and filename from a CFDIRECTORY tag into another 
> query.  My plan is to put this resulting query into the application scope 
> since this data is relatively static and time consuming to generate.
> 
> <CFSET ThePath = "#APPLICATION.RootServerPath#doc\ToolImages\Photos">
> <cfdirectory 
>   directory ="#ThePath#" 
>   action="list"
>   name="ImageList" 
>   filter="*.jpg"
>   recurse = "yes"
>   type="all">
>   
> <cfquery dbtype="query" name="myList"> 
>     SELECT name as imageName, replace(directory,"#ThePath#","") as imageDir
>     FROM ImageList
> </cfquery>
>   
> myList would be set as an application scope variable in the next stages of 
> this.  I'll use it in another QoQ.
> 
> Thanks!
> 
> Warren Koch
> 
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311915
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to