Filtering a list for duplicate email addresses

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Filtering a list for duplicate email addresses

Paul Melia
Hi all,

I have a configuration where there are groups connected by a common  
element...

Common Element: Combat wombat overpopulation

Groups: Partners, References, XYZ staff members

What I want to do is extract the email address for each group member  
and create one master email list that I can use to broadcast messages.
The need for filtering arises because there are more than one common  
element, so the situation actually looks like this...


Overall topic: Marsupials Management

Project 1: Combat wombat overpopulation (partners, staff, references)

Project 2: Kangaroo birth control efforts of South Wales (partners,  
staff, references)

and so on...

The issue arises because project 1 and project 2 could share a  
reference or partner. So I want to filter out duplicate email address.
And there are approximately 3K addresses to be processed.

I can think of a number of different ways to approach an solution -  
create an array and filter that, write to a file and filter that, etc  
- but I thought to ask here first and see if anyone had any advice/
experience they could share.

Thanks!
Paul M.

============================================
Attend the Lasso Summit
March 2-4, 2007 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Filtering a list for duplicate email addresses

Bil Corry-3
If you control all points of entry for the various projects, then create a master email table where the email address column is set to be unique, and as someone is added to the project, add their email address to the table -- if it fails because their email address is already in the table, ignore the error (you could check if it exists, then add it, but it's an extra call to the db).

If instead you have to rebuild the email list every time you send a message, then pull the emails and store them in a map.  A map won't allow duplicate values, so your email list will be auto-filtered that way.

- Bil


Paul Melia wrote on 2/7/2007 8:45 AM:

> Hi all,
>
> I have a configuration where there are groups connected by a common
> element...
>
> Common Element: Combat wombat overpopulation
>
> Groups: Partners, References, XYZ staff members
>
> What I want to do is extract the email address for each group member and
> create one master email list that I can use to broadcast messages.
> The need for filtering arises because there are more than one common
> element, so the situation actually looks like this...
>
>
> Overall topic: Marsupials Management
>
> Project 1: Combat wombat overpopulation (partners, staff, references)
>
> Project 2: Kangaroo birth control efforts of South Wales (partners,
> staff, references)
>
> and so on...
>
> The issue arises because project 1 and project 2 could share a reference
> or partner. So I want to filter out duplicate email address.
> And there are approximately 3K addresses to be processed.
>
> I can think of a number of different ways to approach an solution -
> create an array and filter that, write to a file and filter that, etc -
> but I thought to ask here first and see if anyone had any
> advice/experience they could share.
>
> Thanks!
> Paul M.



============================================
Attend the Lasso Summit
March 2-4, 2007 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Filtering a list for duplicate email addresses

Paul Melia
Thanks Bil - great advice as always!

I think I will go the master table route as that allows me to have my  
cake and eat it too (master list for everyone broadcast while still  
having people separated into groups for targeted mailings)


Paul M.

On Feb 7, 2007, at 12:07 PM, Bil Corry wrote:

> If you control all points of entry for the various projects, then  
> create a master email table where the email address column is set  
> to be unique, and as someone is added to the project, add their  
> email address to the table -- if it fails because their email  
> address is already in the table, ignore the error (you could check  
> if it exists, then add it, but it's an extra call to the db).
>
> If instead you have to rebuild the email list every time you send a  
> message, then pull the emails and store them in a map.  A map won't  
> allow duplicate values, so your email list will be auto-filtered  
> that way.
>
> - Bil

============================================
Attend the Lasso Summit
March 2-4, 2007 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Filtering a list for duplicate email addresses

Bil Corry-3
Paul Melia wrote on 2/7/2007 9:31 AM:
> I think I will go the master table route as that allows me to have my
> cake and eat it too (master list for everyone broadcast while still
> having people separated into groups for targeted mailings)

The tricky part is when they leave a group, you don't want to remove them from the master list if they belong to more than one group.  So perhaps having a counter stored along with their email, then increment/decrement as they join/leave groups.  If they leave a group and their counter is 1, then you can erase them entirely from the table.

- Bil



============================================
Attend the Lasso Summit
March 2-4, 2007 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage