【问题标题】:"Join expression not supported" for multiple Left Join in MS AccessMS Access 中多个左连接的“连接表达式不支持”
【发布时间】:2018-05-22 18:41:28
【问题描述】:

我在我的 ASP.NET 项目中作为字符串传递了以下查询:

SELECT creditorName, amount, interestRate, interestType, interestCalculationMethod, insertedDate, o.fullName AS owner, u.fullName AS dataInsertedBy FROM ((tbl_savings s) LEFT JOIN tbl_users o ON (ownerID = o.userID)) LEFT JOIN tbl_users u ON (dataEnteredByID = u.userID);

我收到以下错误:

+       $exception  {"Join expression not supported."}  System.Data.OleDb.OleDbException

我使用 MS Access 2016 作为数据库。

怎么了?

【问题讨论】:

    标签: sql ms-access oledb


    【解决方案1】:

    我在 MSDN 上找到了解决方案。这是链接:

    https://social.msdn.microsoft.com/Forums/office/en-US/15c36745-f7a4-4926-9687-7161e5894468/join-expression-not-supported-error-caused-by-unbracketed-join-expression-comprising-string?forum=accessdev

    对于没有在我发布的链接中提供正确答案,我深表歉意。正确答案如下:

    select savingsID, creditorName, amount, interestRate, interestType, interestCalculationMethod, insertedDate, ownerID, o.fullName as owner, u.fullName as dataEnteredBy from((tbl_savings as s) left join tbl_users as o on s.ownerID = o.userID) left join tbl_users as u on s.dataEnteredByID = u.userID
    

    【讨论】:

      猜你喜欢
      • 2017-04-12
      • 2010-10-13
      • 1970-01-01
      • 1970-01-01
      • 2021-11-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-08-29
      相关资源
      最近更新 更多