Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2006
    Posts
    8

    Unanswered: Inner Joins with Three Tables

    Hello

    Trying to do an inner join with four tables. I've got two SQL statements but want to somehow combine them, but everytime Access gives me errors.
    The two statements are:

    SELECT MEMBERS.MEM_ID, MEMBERS.MEM_FNAME, MEMBERS.MEM_SNAME, MEETINGS.MEET_ID
    FROM MEMBERS INNER JOIN (MEETINGS INNER JOIN MEETING_ATTENDANCE ON MEETINGS.MEET_ID = MEETING_ATTENDANCE.MEET_ID) ON MEMBERS.MEM_ID = MEETING_ATTENDANCE.MEM_ID
    WHERE (((MEETINGS.MEET_DATE)=[Enter a meeting date]));

    SELECT MEETINGS.MEET_ID, MINUTES.MINUTE_ID, MINUTES.SUBJECT, MINUTES.DESCRIP, MINUTES.DECISION
    FROM MINUTES INNER JOIN MEETINGS ON MINUTES.MINUTE_ID = MEETINGS.MINUTE_ID
    WHERE (((MEETINGS.MEET_DATE)=[Enter a meeting date]));

    Any ideas of how to combine this?! Would be grateful for any help.

    Thanks.

  2. #2
    Join Date
    Nov 2003
    Location
    Sussex, England
    Posts
    404
    What error messages are you getting?

  3. #3
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Code:
    SELECT MEETINGS.MEET_ID
         , MINUTES.MINUTE_ID
         , MINUTES.SUBJECT
         , MINUTES.DESCRIP
         , MINUTES.DECISION
         , MEMBERS.MEM_ID
         , MEMBERS.MEM_FNAME
         , MEMBERS.MEM_SNAME
      FROM ((
           MEETINGS
    INNER 
      JOIN MINUTES 
        ON MINUTES.MINUTE_ID = MEETINGS.MINUTE_ID
           )
    INNER 
      JOIN MEETING_ATTENDANCE 
        ON MEETING_ATTENDANCE.MEET_ID = MEETINGS.MEET_ID
           )
    INNER 
      JOIN MEMBERS 
        ON MEMBERS.MEM_ID = MEETING_ATTENDANCE.MEM_ID
     WHERE MEETINGS.MEET_DATE = [Enter a meeting date]
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  4. #4
    Join Date
    Mar 2006
    Posts
    8
    Awesome. Problem resolves. Thanks a million!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •