You could also use a query-of-queries with where biglistitem not in (smalllistitems).
On 5/3/12 1:29 PM, Cameron Childress wrote: > On Thu, May 3, 2012 at 12:10 PM, Les Mizzell<[email protected]> wrote: > >> > convert your list to an array and loop over that >> >> The small list is the one that will have the operations done to it. The >> large list is the one that I need to search for duplicate values. If the >> server was running CF9 then I could use ArrayFind but that's not >> available in CF8. > > Soooo.... You don't want to convert to an array and loop over that rather > than a list? > > ArrayFind() is a shortcut for looping over an array, but you can also do > that manually. Small lists aren't much of a problem, just big ones. So > convert the long list to an array, or maybe even just use the query object > from the DB on the long list. Leave the short list as is, it's unlikely to > ever cause performance issues at 10 items. > > Psudocode: > > loop array=biglist > { > if (listFind(biglistItem,smalllist)) > { > smalllist = listDeleteAt(smalllist, listFind(biglistItem,smalllist))); > } > } > > Now you have a de-duped small list. > > -Cameron > > ... > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350990 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

