很高興能找到這樣一個有天才成員的有用網站。我一直在嘗試爲此SQLITE問題尋找解決方案。谷歌沒有幫助我,除了找到這個網站。 SQL查詢適用於同一數據庫的MSAccess版本。SQLITE INNERJOIN夢魘,需要此解決方案
這是我的SQL語句 - 這對我沒有用。
SELECT Invoices.InvoiceNumber, Invoices.Quantity,Invoices.Code, Invoices.Price,Invoices.Discount, Invoices.InvoiceGrandTotal, Employees.EmployeeName, Customers.CustomerName, Invoices.DateOfInvoice, [price]*[Quantity] AS Total, Customers.Address, Products.Description,Products.Unit
FROM Products
INNER JOIN (
(
(Invoices INNER JOIN InvoiceDetails
ON Invoices.InvoiceNumber = InvoiceDetails.InvoiceNumber
) INNER JOIN Customers
ON Invoices.CustomerID = Customers.CustomerID
) INNER JOIN Employees
ON Invoices.UserID = Employees.EmployeeID
) ON Products.Code = InvoiceDetails.Code
WHERE (((InvoiceDetails.InvoiceNumber)='10111'));
的錯誤消息是:「Cannot compile Select-Statement: no such column: Invoices.InvoiceNumber
」
發佈您的創建表腳本。 – 2010-02-08 02:53:44
我找到了解決方案。 Ron Savage的解決方案可以無縫工作。 – Shaamil 2010-02-08 03:46:22