Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using A Table as <> Criteria

Status
Not open for further replies.

realstandman

IS-IT--Management
Oct 29, 2003
87
US
Ok, I need to use a table of email address's to not be included on a query sort of like

[Bad_Email].[Bad_Email]<>[ConsentMaster].[member_email_address]

Below is the query I need to have this work with. I have tried every variation possible. Any help or tips will be greatly appreciated.


SELECT DISTINCT [ConsentMaster].[ccompany], [ConsentMaster].[cparent_group], [ConsentMaster].[cgroup], [ConsentMaster].[member_social_security_number], [ConsentMaster].[member_last_name], [ConsentMaster].[member_first_name], [ConsentMaster].[member_email_address]
FROM ConsentMaster INNER JOIN Consentqry2 ON ([ConsentMaster].[member_social_security_number]=[Consentqry2].[member_social_security_number]) AND ([ConsentMaster].[Date Stamp]=[Consentqry2].[Max Date])
WHERE ((([ConsentMaster].[member_email_address]) Like ("*@*.*") And ([ConsentMaster].[member_email_address]) Is Not Null) And (([ConsentMaster].[Consent])="y"));
 
Something like this ?
WHERE [ConsentMaster].[member_email_address] Like '*@*.*' And [ConsentMaster].[member_email_address] Is Not Null And [ConsentMaster].[Consent]='y'
And [ConsentMaster].[member_email_address] Not In (SELECT Bad_Email FROM Bad_Email);

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Yep, that did it!!

Thanks Alot, You are truly the man!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top