Query syntax to select ALL minus results from another query
Posted on 2014-08-11
I have two queries. One will return 'all users' of a certain kind (usertype), the other will return a portion of those users that are linked to a 'case'.
The query I need is the results of query # 1, minus the results of query # 2, to avoid them for being duplicated when I display them on the screen.
Query # 1
WHERE (users.Usertype='attorney' or users.Usertype= 'paralegal') and archivedcont = 0
Query # 2
INNER JOIN Users ON atts.userid = users.userid
WHERE CaseId = MMColParam and email IS NOT NULL and email <> '' and users.archivedcont = 0 and (users.Usertype='attorney' or users.Usertype= 'paralegal')