Hi, I have 2 very large lists (one has over 40,000 elements and the other approx 1/2 that). The list elements contain IDs so only 2-6 ints per element. I want to remove all the elements of the smaller list from the bigger list so I need to with a third list which will A-B=C (I hope that makes sense). This is a one function... What is the best way to do this please? Thanks
you could probably find a faster way to do this but.. <cfloop list="#a#" index="alist"> <cfif NOT listfind(b,"#alist#")> <cfset temp=listappend(c,"#alist#")> </cfif> </cfloop> for the size of the lists i doubt this is the best method.. but if you're in need of a temporary solution this should work..
First place I check for this kind of thing is www.cflib.org. Most times whatever I'm trying to do ... they've got a function for that Their String library has a bunch of list functions http://www.cflib.org/library.cfm?ID=1