Just open one table only and then click on the [SQL] button and paste the SQL query statement you want to use as there's no releationship between BillItemLine and InvoiceLine.
Queries like:
Select BillItemLine.ItemLineItemRefFullName as Part, BillItemLine.ItemLineDesc as "Desc", max(BillItemLine.TxnDate) as LastPurchased, BillItemLine.ItemLineQuantity as PurchQTY, max(InvoiceLine.TxnDate) as LastSold, InvoiceLine.InvoiceLineQuantity as SoldQTY, {fn CURDATE()} - {fn CONVERT(BillItemLine.TxnDate, SQL_DATE)} as DaysInStock from BillItemLine, ItemInventory, InvoiceLine Where BillItemLine.ItemLineItemRefListID = ItemInventory.ListID and BillItemLine.ItemLineItemRefListID = InvoiceLine.InvoiceLineItemRefListID and BillItemLine.TxnDate > InvoiceLine.TxnDate group by BillItemLine.ItemLineItemRefFullName, BillItemLine.ItemLineDesc, BillItemLine.TxnDate, BillItemLine.ItemLineQuantity, InvoiceLine.TxnDate, InvoiceLine.InvoiceLineQuantity
can not be graphically represented in MS Query. |