ms access - SQL merge two tables then remove entries based on a third list -
we have 2 mailing lists need combine, ,
- make sure there no duplicates and
- compare against 3rd list (the unsubscribe list) , remove names on list.
i've tried
select distinct * [table1.emailaddress table1 union select table2.emailaddress table2]. [email];
which works fine 1st problem. tried add
where not exist (select table3.emailaddress table3)
to select query, no avail...
we're using access 2000 ( no won't upgrade);
tables have other fields, none of match other tables.
emailaddress fields have non matching cases...
select distinct email ( select email table1 union select email table2 )x not exists( select * table3 t3 t3.email=x.email )
if have case sensitive db lower()
email columns.
Comments
Post a Comment