我正在尝试用SQL编写查询但是在访问时遇到语法错误。我在网上检查了各种代码检查器,但他们都说没有问题。有人可以帮忙吗?
SELECT
PROJECT.ProjectID,
PROJECT.Name,
PROJECT.Department,
EMPLOYEE.EmployeeNumber,
EMPLOYEE.LastName,
EMPLOYEE.FirstName,
EMPLOYEE.Phone
FROM
ASSIGNMENT
INNER JOIN
EMPLOYEE
ON ASSIGNMENT.EmployeeNumber = EMPLOYEE.EmployeeNumber
INNER JOIN
PROJECT
ON ASSIGNMENT.ProjectID = PROJECT.ProjectID;
答案 0 :(得分:1)
MS Access需要多个JOIN
的括号:
FROM (ASSIGNMENT INNER JOIN
EMPLOYEE
ON ASSIGNMENT.EmployeeNumber = EMPLOYEE.EmployeeNumber
) INNER JOIN
PROJECT
ON ASSIGNMENT.ProjectID = PROJECT.ProjectID;