-1

I am trying to return a view using 2 joins statement on one query but somehow I keep getting this error

The Error

and my query as following:

SELECT First_Name, Second_Name, Last_Name, Course_Name, Date_Course, College_Name AS OperationDetails
FROM Operations
INNER Join Users
ON Operations.User_id = Users.User_Id
INNER Join Courses
On Operations.course_Id = Courses.Course_Id;

And this is my entire database relationship

enter image description here

AbdallahRizk
  • 107
  • 1
  • 5
  • Please in code questions give a [mre]--cut & paste & runnable code; example input (as initialization code) with desired & actual output (including verbatim error messages); tags & versions; clear specification & explanation. For errors that includes the least code you can give that is code that you show is OK extended by code that you show is not OK. (Debugging fundamental.) For SQL that includes DBMS & DDL, which includes constraints & indexes & tabular initialization. [ask] PS You have a syntax error. Chop code out. Read the grammar & manual. Show that constituent subexpressions are OK. – philipxy Feb 12 '20 at 03:13
  • Please [use text, not images/links, for text--including tables & ERDs](https://meta.stackoverflow.com/q/285551/3404097). Use images only for what cannot be expressed as text or to augment text. Images cannot be searched for or cut & pasted. Include a legend/key & explanation with an image. This is a faq. Before considering posting please always google any error message or many clear, concise & precise phrasings of your question/problem/goal, with & without your particular strings/names & site:stackoverflow.com & tags; read many answers. – philipxy Feb 12 '20 at 03:14
  • Does this answer your question? [SQL multiple join statement](https://stackoverflow.com/questions/7854969/sql-multiple-join-statement) – philipxy Feb 12 '20 at 03:17

1 Answers1

2

MS Access has a strange requirement for parentheses for more than one JOIN:

SELECT First_Name, Second_Name, Last_Name, Course_Name, Date_Course, College_Name AS OperationDetails
FROM (Operations INNER JOIN
      Users
      ON Operations.User_id = Users.User_Id
     ) INNER JOIN
     Courses
     ON Operations.course_Id = Courses.Course_Id;
Gordon Linoff
  • 1,242,037
  • 58
  • 646
  • 786