SecureNetworx
Technical User
I have columns in 3 tables I am working with; I am trying to exclude items in found in tblACCEPTED_SITES.UrlDomain but they show up in results. Any ideas what I am doing wrong?
SELECT tblLAN_OUT.MsgConndestdomain, tblLAN_OUT.MsgConndestport, COUNT(*) AS TotalHits
FROM tblLAN_OUT INNER JOIN tblHOSTS ON tblLAN_OUT.MsgConnsrcdomain = tblHOSTS.HostName
INNER JOIN tblACCEPTED_SITES ON tblLAN_OUT.MsgConndestdomain <> tblACCEPTED_SITES.UrlDomain
WHERE (tblHOSTS.HostOwner = 'Corporate') AND (tblLAN_OUT.MsgDate >= '2005-06-01')
GROUP BY tblLAN_OUT.MsgConndestdomain, tblLAN_OUT.MsgConndestport
ORDER BY COUNT(*) DESC
SELECT tblLAN_OUT.MsgConndestdomain, tblLAN_OUT.MsgConndestport, COUNT(*) AS TotalHits
FROM tblLAN_OUT INNER JOIN tblHOSTS ON tblLAN_OUT.MsgConnsrcdomain = tblHOSTS.HostName
INNER JOIN tblACCEPTED_SITES ON tblLAN_OUT.MsgConndestdomain <> tblACCEPTED_SITES.UrlDomain
WHERE (tblHOSTS.HostOwner = 'Corporate') AND (tblLAN_OUT.MsgDate >= '2005-06-01')
GROUP BY tblLAN_OUT.MsgConndestdomain, tblLAN_OUT.MsgConndestport
ORDER BY COUNT(*) DESC