Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
haymarketpaul
Creator III
Creator III

Filtering Duplicate Emails

Hello

I have 2 separate lists of email addresses (online & bulletin)

Lets say for online i have:

     a@a.com

     b@b.com

     c@c.com

     d@d.com

and for bulletin i have:

     c@c.com

     d@d.com

     e@e.com

     f@f.com

i need to be able to select email addresses that are either:

1.     only online email addresses

2.     only bulletin email addresses

3.     email addresses that appear in both online AND bulletin lists

Not sure of the best way to handle this in the LOAD script to then display and be able to select either of these scenarios?

1 Solution

Accepted Solutions
swuehl
MVP
MVP

I would suggest that you concatenate both lists, and create a new field to filter the origin, maybe using something like:

INPUT:

LOAD *, 'Online' as Type INLINE [

email

a@a.com

b@b.com

c@c.com

d@d.com

];

LOAD *, 'Bulletin' as Type INLINE [

email

c@c.com

d@d.com

e@e.com

f@f.com

];

RESULT:

NOCONCATENATE LOAD email, if(minstring(Type)=maxstring(Type), only(Type), 'Both') as Type resident INPUT group by email;

drop table INPUT;

corrected script to label first load correctly

View solution in original post

2 Replies
swuehl
MVP
MVP

I would suggest that you concatenate both lists, and create a new field to filter the origin, maybe using something like:

INPUT:

LOAD *, 'Online' as Type INLINE [

email

a@a.com

b@b.com

c@c.com

d@d.com

];

LOAD *, 'Bulletin' as Type INLINE [

email

c@c.com

d@d.com

e@e.com

f@f.com

];

RESULT:

NOCONCATENATE LOAD email, if(minstring(Type)=maxstring(Type), only(Type), 'Both') as Type resident INPUT group by email;

drop table INPUT;

corrected script to label first load correctly

haymarketpaul
Creator III
Creator III
Author

Works perfectly Thanks

was missing this crucial bit...very clever.

if(minstring(Type)=maxstring(Type), only(Type), 'Both') as Type