2 Replies Latest reply: Nov 3, 2014 5:50 PM by Jonathan Poole RSS

    JOIN question

      I have a table (EVENTS) that has OwnerID as the primary key, and in which there are multiple records for each OwnerId.   I also have a table called TARGETs, which has the same primary key, but has a 1:1 relationship (one row for each sales rep).


      There are some sales reps in the TARGETS table that have no events.  However,  want these sales reps to be included in the same table as the reps who DO have events.  For example:


      SALES REP           TARGET                EVENTS

      Rep A                    100                         50

      Rep B                    50                           0

      Rep C                    75                           25


      If I select an event date range for a rep who doesn’t have any events in that range, I still want to see them in the table with their target.


      I’ve already done two joins to get the EVENTS table, and two separate joins to get the TARGETS table.  How do I join these two tables to get ALL records included?