查询表达式中缺少运算符

时间:2016-11-24 11:21:14

标签: ms-access-2013

我有这段代码

SELECT Sales.InvoiceNo, Sales.SaleDate, Clients.Name, Clients.Address AS
ClientAdrs, Stock.Itemname, Stock.Tax, Stock.Price, Transactions.Qty, 
Transactions.NetValue,Transactions.TaxAmount, Transactions.TotalAmount, 
Sales.GrossNet, Sales.GrossTax, Sales.GrossTotal, Sales.PrintingCharge,
Sales.LabourCharge, Sales.AdjustableAmount,Sales.GrandTotal, Sales.InWords,
ShopeDetails.Address, ShopeDetails.Email, ShopeDetails.Mobile1,
ShopeDetails.Mobile2, ShopeDetails.TIN, ShopeDetails.AcN,ShopeDetails.IFC

FROM Sales 
INNER JOIN Clients
ON Sales.Cid = Clients.Cid 
INNER JOIN Transactions 
ON Sales.InvoiceNo = Transactions.InvoiceNo
INNER JOIN Stock 
ON Transactions.Sid = Stock.Sid 
INNER JOIN ShopeDetails 
ON Sales.Id = ShopeDetails.Id  

我收到此错误

  

查询表达式中的语法错误(缺少运算符)   Sales.Cid = Clients.Cid INNER JOIN Transactions on Sales.InvoiceNo = Transactions.InvoiceNo INNER JOIN Stock ON Transactions.Sid​​ = Stock.Sid INNER JOIN ShopeDetails ON Sales.Id = ShopeDetails.I

请帮助任何人!!

1 个答案:

答案 0 :(得分:0)

SELECT Sales.InvoiceNo, Sales.SaleDate, Clients.Name, Clients.Address AS 
ClientAdrs,Stock.Itemname, Stock.Tax, Stock.Price, Transactions.Qty, 
Transactions.NetValue,Transactions.TaxAmount, Transactions.TotalAmount,
Sales.GrossNet, Sales.GrossTax, Sales.GrossTotal, Sales.PrintingCharge, 
Sales.LabourCharge, Sales.AdjustableAmount,Sales.GrandTotal, Sales.InWords,
ShopeDetails.Address, ShopeDetails.Email, ShopeDetails.Mobile1,
ShopeDetails.Mobile2, ShopeDetails.TIN, ShopeDetails.AcN,ShopeDetails.IFC 

FROM (((Sales INNER JOIN Clients ON Sales.Cid = Clients.Cid) 
       INNER JOIN Transactions ON Sales.InvoiceNo = Transactions.InvoiceNo) 
       INNER JOIN Stock ON Transactions.Sid = Stock.Sid )
       INNER JOIN ShopeDetails ON Sales.Id = ShopeDetails.Id   

这解决了问题