Hi,
I am trying to join some tables with the following statement:
SELECT Users.FirstName, Users.Surname, Meetings.Title, Meetings.OrganiserID, Meetings.RoomID, Meetings.MeetingID, Meetings.Date, Meetings.StartTime, Meetings.EndTime, O.FirstName, O.Surname FROM ((Attendees AS A LEFT JOIN Users ON A.UserID=Users.UserID) LEFT JOIN Meetings ON A.MeetingID=Meetings.MeetingID) LEFT JOIN Users AS O ON Meetings.OrganiserID=O.UserID
The idea is to produce a recordset that shows the name of a person attending a meeting, details of the meeting and the organiser of the meeting. I am using aliasing because it looks up the name of the attendee and the name of the organiser from the same table (Users).
It works to an extent however if a meeting exists but noone is attending it it does omits the record. I have come across something similar before but I thought using a left join would fix it. I tried opening the query in Design View in Access and double clicking the arrows showing the links between the tables and selecting the middle option on all of them but that does not appear to have fixed the problem.
Any idea where I might be going wrong? If you need any more info about the table structure/contents please let me know.
Thanks very much
Ed
I am trying to join some tables with the following statement:
SELECT Users.FirstName, Users.Surname, Meetings.Title, Meetings.OrganiserID, Meetings.RoomID, Meetings.MeetingID, Meetings.Date, Meetings.StartTime, Meetings.EndTime, O.FirstName, O.Surname FROM ((Attendees AS A LEFT JOIN Users ON A.UserID=Users.UserID) LEFT JOIN Meetings ON A.MeetingID=Meetings.MeetingID) LEFT JOIN Users AS O ON Meetings.OrganiserID=O.UserID
The idea is to produce a recordset that shows the name of a person attending a meeting, details of the meeting and the organiser of the meeting. I am using aliasing because it looks up the name of the attendee and the name of the organiser from the same table (Users).
It works to an extent however if a meeting exists but noone is attending it it does omits the record. I have come across something similar before but I thought using a left join would fix it. I tried opening the query in Design View in Access and double clicking the arrows showing the links between the tables and selecting the middle option on all of them but that does not appear to have fixed the problem.
Any idea where I might be going wrong? If you need any more info about the table structure/contents please let me know.
Thanks very much
Ed