First, get your query from the database. Then, get your query from CFDIRECTORY. Finally, put them together with a Query of a Query.
If that is slow, due to CF's processing, you could dump the CFDIRECTORY query into the database and do that query. Also, if you have SQL 2005, you could do this with an SSIS package. m!ke -----Original Message----- From: Rick Faircloth [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2008 7:26 AM To: CF-Talk Subject: What's a better way to handle this? Hi, all... I've got a database table of properties with mls numbers. I've got a directory of photos. I need to check and see if any of the photos names contain the mls number of any of the properties, and, if so, copy the matching photos to a new directory. I tried querying the db for all mls numbers and also running cfdirectory to get all the photo names. Then I ran this code: <cfloop query='get_mls'> <cfloop query="photolist"> <cfif #listfirst(photolist.name, '_')# is #get_mls.mls_number#> <cfoutput>#listfirst(photolist.name, '_')# (#i#)</cfoutput><br> <cfset i=i+1> </cfif> </cfloop> </cfloop> First problem: request timeout Solution: <cfsetting requesttimeout = '60000'> Second problem: java.lang.OutOfMemoryError: Java heap space What a more efficient way of handling this process, assuming the approach above would even work? Thanks for any help! Rick ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:306808 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

