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
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
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!
...@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
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
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,
...@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
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
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
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
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
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
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
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
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
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
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
. 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
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
-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
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
(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
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
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
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
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
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
-
: 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
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
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:
30 matches
Mail list logo