Worked Perfect!
Thanks
Rick
-----Original Message-----
From: Greg Luce [mailto:[EMAIL PROTECTED]
Sent: Sunday, March 14, 2004 1:40 PM
To: CF-Talk
Subject: RE: Compare List
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
_____
[HYPERLINK "http://www.houseoffusion.com/lists.cfm?link=t:4"Todays Threads]
[HYPERLINK "http://www.houseoffusion.com/lists.cfm?link=i:4:156447"This
Message] [HYPERLINK
"http://www.houseoffusion.com/lists.cfm?link=s:4"Subscription] [HYPERLINK
"http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=984.904.4"Fast
Unsubscribe] [HYPERLINK "http://www.houseoffusion.com/signin/"User Settings]
_____
HYPERLINK "http://www.houseoffusion.com/banners/view.cfm?bannerid=37" \n
---
Incoming 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
---
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]
- Compare List cfhelp
- Re: Compare List Dave Carabetta
- RE: Compare List Greg Luce
- RE: Compare List Brendan Avery
- RE: Compare List Greg Luce
- RE: Compare List Bernd VanSkiver
- Re: Compare List Christopher Farino
- RE: Compare List Brendan Avery
- RE: Compare List Greg Luce
- RE: Compare List cfhelp
- RE: Compare List Pascal Peters
- RE: Compare List Tangorre, Michael
- RE: Compare List Tony Weeg