Hi,
I am having trouble with a query that is joining two tables...
The first table is
Contact
which has fields ID, CompanyName, AddressLine1, etc
The second table is
Contact History
which has the fields ID, ContactID, CommunicationID, CreateDate
The Contact History table contains a record of all communication sent to a Contact, the communication is referenced by CommunicationID and the Contact is referenced by the ContactID.
I am now trying to create a Query that will tell me for a particular CommunicationID which Contacts have not received that Communication.
I thought I could use the JOIN queries but I can't seem to get it to return the correct result...
The query I am trying that returns only the Contact History records that do not match the CommunicationID rather than the Contact records is....
SELECT Contact.ID, Contact.CompanyName, [Contact History].ContactID, [Contact History].CommunicationID, [Contact History].CreateDate
FROM Contact LEFT JOIN [Contact History] ON Contact.ID = [Contact History].ContactID
WHERE ((([Contact History].CommunicationID)<>9));
Any help or guidance would be appreciated...
Thanks
Scott
I am having trouble with a query that is joining two tables...
The first table is
Contact
which has fields ID, CompanyName, AddressLine1, etc
The second table is
Contact History
which has the fields ID, ContactID, CommunicationID, CreateDate
The Contact History table contains a record of all communication sent to a Contact, the communication is referenced by CommunicationID and the Contact is referenced by the ContactID.
I am now trying to create a Query that will tell me for a particular CommunicationID which Contacts have not received that Communication.
I thought I could use the JOIN queries but I can't seem to get it to return the correct result...
The query I am trying that returns only the Contact History records that do not match the CommunicationID rather than the Contact records is....
SELECT Contact.ID, Contact.CompanyName, [Contact History].ContactID, [Contact History].CommunicationID, [Contact History].CreateDate
FROM Contact LEFT JOIN [Contact History] ON Contact.ID = [Contact History].ContactID
WHERE ((([Contact History].CommunicationID)<>9));
Any help or guidance would be appreciated...
Thanks
Scott