Compare Two Lists

2013-07-17 Thread i...@markleder.com i...@markleder.com
Hi all, Attempting to clean up a table with email records. In addition to the existing table of good and bad email addresses, I have a csv file with addresses that would need to be matched up to the db table, then deleted (so I just have good addresses). Email addresses are properly

RE: Compare Two Lists

2013-07-17 Thread Mark A Kruger
handle n number of items in a list - something like 16k I think. -Mark -Original Message- From: i...@markleder.com i...@markleder.com [mailto:i...@markleder.com] Sent: Wednesday, July 17, 2013 9:02 AM To: cf-talk Subject: Compare Two Lists Hi all, Attempting to clean up a table

Re: Compare Two Lists

2013-07-17 Thread i...@markleder.com i...@markleder.com
Sure seems like I make things more complicated than they need to be. If the simple delete statement as you show will drop out the 4000 records without looping, then great! ~| Order the Adobe Coldfusion Anthology now!

RE: Compare Two Lists

2013-07-17 Thread Mark A Kruger
...@markleder.com i...@markleder.com [mailto:i...@markleder.com] Sent: Wednesday, July 17, 2013 10:08 AM To: cf-talk Subject: Re: Compare Two Lists Sure seems like I make things more complicated than they need to be. If the simple delete statement as you show will drop out the 4000 records without looping

Re: Compare Two Lists

2013-07-17 Thread i...@markleder.com i...@markleder.com
FWIW: I have 4000 records to delete, with CF 9, throws an error: [Macromedia][SQLServer JDBC Driver][SQLServer]The incoming request has too many parameters. The server supports a maximum of 2100 parameters. Reduce the number of parameters and resend the request. I can break up the routines

Re: Compare Two Lists

2013-07-17 Thread Cameron Childress
Depending on where this CSV file is coming from, I'd just not use cfqueryparam. The only real reason to use it in a case like this is to make sure nobody's SQL injecting you. If this is an automated process and you think maybe one day you might not be able to trust the inputs form the CVS file,

Re: Compare Two Lists

2013-07-17 Thread Jeff Garza
...@markleder.com i...@markleder.com i...@markleder.com Sent: Wednesday, July 17, 2013 12:01 PM To: cf-talk cf-talk@houseoffusion.com Subject: Re: Compare Two Lists FWIW: I have 4000 records to delete, with CF 9, throws an error: [Macromedia][SQLServer JDBC Driver][SQLServer]The incoming request

RE: Compare Two Lists

2013-07-17 Thread Mark A Kruger
to write list code :) -Mark -Original Message- From: Cameron Childress [mailto:camer...@gmail.com] Sent: Wednesday, July 17, 2013 2:10 PM To: cf-talk Subject: Re: Compare Two Lists Depending on where this CSV file is coming from, I'd just not use cfqueryparam. The only real reason to use

Re: Compare Two Lists

2013-07-17 Thread Cameron Childress
On Wed, Jul 17, 2013 at 5:09 PM, Mark A Kruger wrote: That's one of the reasons that I USE cfqueryparam - to keep me from having to write list code :) Agreed. It's rare that I recommend against cfqueryparam, but in this case I think it might be easier. -Cameron

RE: Compare two lists and if one element common ...

2007-04-16 Thread Andy Matthews
Message- From: Mike Kear [mailto:[EMAIL PROTECTED] Sent: Sunday, April 15, 2007 2:20 AM To: CF-Talk Subject: Compare two lists and if one element common ... Is there an easy way to compare two lists and if there is at least one common value then .. do something? What I'm imagining is something

OUTCOME: Re: Compare two lists and if one element common ... -

2007-04-16 Thread Mike Kear
Thanks Jim for your suggestions. Its a bit late in the day for this project to redesign the whole user authentication/access/permission control architecture,but i have another project starting in a couple of weeks and ill take a good look at what you've done for that one. I am grateful for you

Compare two lists and if one element common ...

2007-04-15 Thread Mike Kear
Is there an easy way to compare two lists and if there is at least one common value then .. do something? What I'm imagining is something like this: UserPermissions = 1000,1003,1005,1006,1007 (held in the session.user.cfc after login) Permissions required = 1003,6048,6484,7809 (part

Re: Compare two lists and if one element common ...

2007-04-15 Thread Andrew Scott
Mike Kear, He who is an Adobe Certified Advanced Coldfusion Devleoper, doesn't know about IsUserInRole(userPermissions,admin,contentAuthor); hehe On 4/15/07, Mike Kear [EMAIL PROTECTED] wrote: Is there an easy way to compare two lists and if there is at least one common value then .. do

Re: Compare two lists and if one element common ...

2007-04-15 Thread Mike Kear
Yes i do know about IsUserInRole, but as i explained in my question i need a much more granular kind of permission set. And anyway i'm not using the CFLOGIN system for a variety of reasons. So yes i do know about it, but in this case I can't use it. Cheers Mike Kear Windsor, NSW, Australia

Re: Compare two lists and if one element common ...

2007-04-15 Thread Andrew Scott
Mike, thats the only method in CF that is the simplest without doing your own IsUserInRole()... On 4/15/07, Mike Kear [EMAIL PROTECTED] wrote: Yes i do know about IsUserInRole, but as i explained in my question i need a much more granular kind of permission set. And anyway i'm not using

Re: Compare two lists and if one element common ...

2007-04-15 Thread Mike Kear
instead. My question was about how to compare two lists, and see if there is at least one common value. A way other than looping through one list and looking for each value in turn in the other list that is. Is there are more elegant way to do it than something like : cfset UserPermissions

Re: Compare two lists and if one element common ...

2007-04-15 Thread Jochem van Dieten
Mike Kear wrote: Is there an easy way to compare two lists and if there is at least one common value then .. do something? cflib has a listcompare function. Jochem ~| Deploy Web Applications Quickly across the enterprise

Re: Compare two lists and if one element common ...

2007-04-15 Thread Andrew Scott
. or you should have bought a green car instead. My question was about how to compare two lists, and see if there is at least one common value. A way other than looping through one list and looking for each value in turn in the other list that is. Is there are more elegant way to do it than

Re: Compare two lists and if one element common ...

2007-04-15 Thread Sean Corfield
On 4/15/07, Mike Kear [EMAIL PROTECTED] wrote: cfset OkToGo = false / cfloop list = #UserPermissions# index=i cfset OkToGo = listfind(Permissionsrequired, #i#) / /cfloop cfif OkToGo is false cflocation addtoken=no url=/index.cfm / cfabort /cfif This all seems a

RE: Compare two lists and if one element common ...

2007-04-15 Thread Jim Davis
-Original Message- From: Mike Kear [mailto:[EMAIL PROTECTED] Sent: Sunday, April 15, 2007 3:20 AM To: CF-Talk Subject: Compare two lists and if one element common ... Is there an easy way to compare two lists and if there is at least one common value then .. do something? What

OUTCOME: Re: Compare two lists and if one element common ... -

2007-04-15 Thread Mike Kear
Thanks Jim for your suggestions. Its a bit late in the day for this project to redesign the whole user authentication/access/permission control architecture,but i have another project starting in a couple of weeks and ill take a good look at what you've done for that one. I am grateful for you

The Outcome: Compare two lists

2007-04-15 Thread Mike Kear
(Sorry if this turns out to be a duplicate - I'm posting again because my post last night hasnt appeared yet.) Thanks Jim for your suggestions. Its a bit late in the day for this project to redesign the whole user authentication/access/permission control architecture,but i have another project

Re: Compare Two Lists - Keep What Is Similar

2002-12-17 Thread Zac Spitzer
Scott Brady wrote: 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. I'd probably convert them both to arrays. Then, I'd loop along the first array and look for each element within the second

Compare Two Lists - Keep What Is Similar

2002-12-16 Thread Wurst, Keith D.
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

RE: Compare Two Lists - Keep What Is Similar

2002-12-16 Thread Timothy Heald
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

Re: Compare Two Lists - Keep What Is Similar

2002-12-16 Thread Scott Brady
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. I'd probably convert them both to arrays. Then, I'd loop along the first array and look for each element within the second array. If it exists in

Re: Compare Two Lists - Keep What Is Similar

2002-12-16 Thread Jerry Johnson
1. Venn tag (http://devex.macromedia.com/developer/gallery/SearchResults.cfm?keywords=venn) 2. query of query Just some ways I've done this in the past Jerry Johnson [EMAIL PROTECTED] 12/16/02 01:17PM Hi everyone. I am looking for a way to compare 2 different lists of information, and

RE: Compare Two Lists - Keep What Is Similar

2002-12-16 Thread Ben Doom
- : 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

Re: Compare Two Lists - Keep What Is Similar

2002-12-16 Thread Jeffry Houser
http://www.cflib.org/udf.cfm?ID=169 And you may also want to look at http://www.cflib.org/udf.cfm?ID=149 Two things to make note of. Arrays and structures are considered to be more efficient than lists. If you are going to have 500 list elements, I might question whether a list is the

Compare Two Lists - Keep What Is Similar

2002-12-16 Thread Eric Creese
Not knowing your database or how you atore the data, if you are using ORACLE you can query the the tables with SELECTs and UNION statement and retrieve the records that INTERSECT an output your results. ~| Archives: