I would loop over the first list, checking to see if the second list
contains it using listcontains(), and append it to a new list if there's a
match.
For 500 records or so, I imagine that the overhead typically involved in
running a more efficient algorithm might not be worth it. However, if
you're feeling industrious, you might try something more like listsort()'ing
the lists, converting them to arrays, and matching each item from the first
array against the second using a binary search.
HTH.
--Ben Doom
Programmer & General Lackey
Moonbow Software
: -----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
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm