You're looking for a match where both lists contain the same values, but
possibly in different orders right? I would try:

<cfset state_list = "1,2,3,4,5,6,7,8">
<cfset query_list = "9,8,7,6,5,4,3,2">

<cfif listlen(state_list) EQ listlen(query_list)>
  <cfloop index="i" list="#state_list#">
    <cfif NOT listcontains(query_list, i)>
      Not A Complete Match<cfabort>
    </cfif>
  </cfloop>
  Lists Match
<cfelse>
  Not Same Length Match
</cfif>

Greg

-----Original Message-----
From: cfhelp [mailto:[EMAIL PROTECTED]
Sent: Sunday, March 14, 2004 2:13 PM
To: CF-Talk
Subject: Compare List

Will Compare(String1,String2) work to compare a list?

I have a Comma Delimited list of GUIDS (up to 50 for each state). That I
need to compare to a list GUIDS from a Query. If they match then return
true (1).

The GUIDS in the list may not be in the same order as the GUIDS from the
query.

Any ideas?

Rick

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.583 / Virus Database: 369 - Release Date: 2/10/2004
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to