The most obvious method is to loop and use listFind()
<cfset match = "no">
<cfloop index="i" list="#list1#">
<cfif listFind(list2,i)>
<cfset match = "yes">
<cfbreak>
</cfif>
</cfloop>
---
Billy Cravens
-----Original Message-----
From: Won Lee [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 12:57 PM
To: CF-Talk
Subject: Most efficient way to check if two lists
Hello,
Need to find out which way is the most efficient way to see if a value
in
list A is a value in list B.
List A = 1,2,3 VALID ListMatch
List B = 2,3,4
List A = 1,2,3 VALID ListMatch
List B = 1,4,6
List A = 1,2,3 NOT VALID ListMatch
List B = 7,4,6
As long as it has single matching values it is valid.
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists