加入同桌两次

时间:2013-12-01 05:36:25

标签: access-vba

我已经阅读了关于这个问题的所有其他帖子并且已经包含了这些建议,但仍然遇到运行时错误3075 :(查询表达式中的语法错误(缺少运算符))。这是我的疑问:

SELECT Patient.FirstName, pE.ID, cE.ID FROM Patient 
    LEFT JOIN EMailAddress AS pE 
              ON Patient.idEMailAddress = pE.ID 
    LEFT JOIN EMailAddress AS cE 
              ON Patient.idReminderEmailCustomEmail = cE.ID

1 个答案:

答案 0 :(得分:1)

访问需要嵌套JOIN s:

中的括号
SELECT Patient.FirstName, pE.ID, cE.ID 
FROM (Patient 
LEFT JOIN EMailAddress AS pE 
          ON Patient.idEMailAddress = pE.ID)
LEFT JOIN EMailAddress AS cE 
          ON Patient.idReminderEmailCustomEmail = cE.ID