Link to home
Start Free TrialLog in
Avatar of johndupaix
johndupaix

asked on

Minus

I have been reading about the minus operation, and haven't got it to work yet.  This is what i need done, maybe someone can answer it for me.

Tables:

Emailcampaign-----Fields are email, name, etc
Unsubscribe-------Fields are email, etc

I need a query that will return all of the records in
the emailcampaign MINUS any in the unsubscribe table so that we will not mail any emails to people who have unsubscribed.
ASKER CERTIFIED SOLUTION
Avatar of Anthony Perkins
Anthony Perkins
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This query will do it:

Select EMailCampaign.* From EMailCampaign
Left Join Unsubscribe on EMailCampaign.email = Unsubscribe.Email
WHERE Unsubscribe.Email Is Null