<cfset list1 = "1,2,3,4,5">
<cfset list2 = "1,3,5,7,9">
<cfset container = "">
<cfloop list="#list1#" index="i">
<cfif listContains(list2,i)>
<cfset container = listAppend(container,i)>
</cfif>
</cfloop>
Might not be exact but it should be close. Will probably be processor intensive on
large lists.
Tim
-----Original Message-----
From: Wurst, Keith D. [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 1:17 PM
To: CF-Talk
Subject: Compare Two Lists - Keep What Is Similar
Hi everyone. I am looking for a way to compare 2 different lists of
information, and after comparing them keep which records are exactly the
same. Does anyone have any suggestions on how to do this? This list have the
potential of being pretty big (500 records each) and I was hoping to have
this process done fairly quick (so the user doesn't have a long wait). Any
help you can provide with this problem is greatly appreciated. Thanks very
much.
Keith
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com