Results 1 to 2 of 2
  1. #1
    totslnewbie is offline Novice
    Windows 7 32bit Access 2010 64bit
    Join Date
    Aug 2015
    Posts
    7

    Query error - ambiguous outer joins?

    Hi all,



    Question related to a query I've created that draws from two different, unrelated tables:
    Table 1 is the masterlist of Participants, Table 2 lists all Data types (9 in total) to be collected from each participant.

    The query will calculate the start and end date of each data collection type, and I would eventually like to filter this query for each month to know which participant will require what data collection type in each month.

    Another table, which is joined to both tables through a Foreign key? contains the list of all data collection events, by participant and by data type.

    In the query, some of the data collection values for which the start and end dates have been calculated would have been completed already, and would be listed in Table 3 (where all the data collection events are inputted). Wherever a record of data collection for a participant occurs in Table 3, I would like the query to somehow identify that either it has been completed, or if the end date window has passed already (less than now), and there is no record in Table 3 of a data collection event, that it is a Missed Data Point.

    When I try to use Table 3 in the query, it limits the records of that query only to those records that show up in Table 3, but I want it to show all participants (from Table 1) and all data points required for each participant (Table 2), and then identify completed dates where they show up in Table 3 ....

    I tried to make the Join type an outer join? but got this error: The SQL statement could not be executed because it contains ambiguous outer joins. To force one of the joins to be performed first, create a separate query that performs the first join and then include that query in your SQL statement


    here's the sql code:

    SELECT tblIParticipantMasterListInfo.PARTICIPANTID, tblDataCollectionTypes.DataID, Switch([DataID]=1,[DateA1CT0]+76,[DataID]=2,[DateA1CT0]+166,[DataID]=3,[DateA1CT0]+256,[DataID]=4,[DateA1CT0]+346,[DataID]=5,[RecruitmentDate]+76,[DataID]=6,[RecruitmentDate]+166,[DataID]=7,[RecruitmentDate]+256,[DataID]=8,[RecruitmentDate]+346,[DataID]=9,[DischargeDate]+14) AS StartDate, Switch([DataID]=1,[DateA1CT0]+120,[DataID]=2,[DateA1CT0]+210,[DataID]=3,[DateA1CT0]+300,[DataID]=4,[DateA1CT0]+390,[DataID]=5,[RecruitmentDate]+120,[DataID]=6,[RecruitmentDate]+210,[DataID]=7,[RecruitmentDate]+300,[DataID]=8,[RecruitmentDate]+390,[DataID]=9,[DischargeDate]+30) AS EndDate
    FROM tblIParticipantMasterListInfo INNER JOIN (tblDataCollectionTypes LEFT JOIN tDataCompletedDates ON tblDataCollectionTypes.DataID = tDataCompletedDates.[Data Collection ID]) ON tblIParticipantMasterListInfo.PARTICIPANTID = tDataCompletedDates.ParticipantID;
    Attached Thumbnails Attached Thumbnails accessdata.jpg  

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870

Please reply to this thread with any new information or opinions.

Similar Threads

  1. How to prevent ambiguous outer joins error message
    By craigugoretz in forum Queries
    Replies: 1
    Last Post: 02-19-2015, 08:10 AM
  2. Replies: 1
    Last Post: 07-01-2014, 11:12 AM
  3. Replies: 15
    Last Post: 10-22-2012, 06:06 PM
  4. ambiguous outer joins
    By libraccess in forum Queries
    Replies: 5
    Last Post: 03-31-2012, 05:41 PM
  5. Ambiguous Outer Join Error
    By scruiks in forum Queries
    Replies: 3
    Last Post: 07-18-2010, 05:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums