Microsoft Access - Sytax Error in JOIN operation

Harley Kronikxz 0 Reputation points
2025-01-26T22:49:43.7733333+00:00

I am struggling with an access database. I cannot figure this out. I keep getting a "Syntax error in JOIN operation" error. Can someone please help me? Below is the SQL data.

SELECT 
      Courses.course_name
      ,Venues.venue_name
      ,Students.student_name
      ,Assessors.assessor_name
      ,Bookings.booking_date
  FROM (Bookings
 INNER  JOIN (Courses 
     ON  Bookings.course_id = Courses.course_id)
  INNER  JOIN (Venues
    ON  Bookings.venue_id = Venues.venue_id)
 INNER  JOIN (Students
     ON  Bookings.student_id = Students.student_id)
 INNER  JOIN (Assessors 
     ON  Bookings.assessor_id = Assessors.assessor_id)
   WHERE   Bookings.booking_date BETWEEN #2025-01-19# AND #2025-01-25#
ORDER BY Courses.course_name, Venues.venue_name, Students.student_name, Assessors.assessor_name;
Access Development
Access Development
Access: A family of Microsoft relational database management systems designed for ease of use.Development: The process of researching, productizing, and refining new or existing technologies.
895 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Erland Sommarskog 116K Reputation points MVP
    2025-01-26T23:07:07.2133333+00:00

    Trying remove the parentheses. They seem to be in the wrong place.


  2. Viorel 119.2K Reputation points
    2025-01-26T23:07:42.4266667+00:00

    Try to remove all ( and ).


  3. Ken Sheridan 2,846 Reputation points
    2025-01-27T00:13:20.12+00:00

    Try this: 

      FROM  (((Bookings
     INNER  JOIN  Courses
         ON  Bookings.course_id = Courses.course_id)
      INNER  JOIN  Venues
        ON  Bookings.venue_id = Venues.venue_id)
     INNER  JOIN  Students
         ON  Bookings.student_id = Students.student_id)
     INNER  JOIN  Assessors
         ON  Bookings.assessor_id = Assessors.assessor_id
    

     

     


  4. Gustav 717 Reputation points MVP
    2025-01-27T07:34:16.7833333+00:00

    This is the generic syntax for Access SQL:

    SELECT 
        Table1.FieldA, Table1.FieldB, Table2.FieldC <etc ..>
    FROM Table1 
    INNER JOIN ((Table2 
        INNER JOIN Table3 ON Table2.ID = Table3.FK) 
            INNER JOIN Table4 ON Table3.ID = Table4.FK) 
    ON Table1.ID = Table2.FK;
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.