A
Abe Katz
Hello All,
I need a list from all the Items in the Inventory, the last date each item
was last sold, and the qty sold.
Doug Steele told me to use a subquery, it works fine with one table but when
I have a Header and a Detail table and using the INNER JOIN, the system
doesn't let me add the aliases table name (AS A). Error msg "Syntax error
missing operator in query expression".
This is my code,
SELECT [Invoice Detail].StyleNo, Invoice.Date AS DateLastInv, Sum([Invoice
Detail].Qty) AS QtyInv
FROM Invoice INNER JOIN [Invoice Detail] ON Invoice.InvoiceNo = [Invoice
Detail].InvoiceNo AS A (AS A, error message)
GROUP BY [Invoice Detail].StyleNo, Invoice.Date
HAVING (((Invoice.Date) In (SELECT Max(Date) FROM [Invoice] WHERE [Invoice
Detail].StyleNo=A.StyleNo)));
Please let me know
Thank you
abe
I need a list from all the Items in the Inventory, the last date each item
was last sold, and the qty sold.
Doug Steele told me to use a subquery, it works fine with one table but when
I have a Header and a Detail table and using the INNER JOIN, the system
doesn't let me add the aliases table name (AS A). Error msg "Syntax error
missing operator in query expression".
This is my code,
SELECT [Invoice Detail].StyleNo, Invoice.Date AS DateLastInv, Sum([Invoice
Detail].Qty) AS QtyInv
FROM Invoice INNER JOIN [Invoice Detail] ON Invoice.InvoiceNo = [Invoice
Detail].InvoiceNo AS A (AS A, error message)
GROUP BY [Invoice Detail].StyleNo, Invoice.Date
HAVING (((Invoice.Date) In (SELECT Max(Date) FROM [Invoice] WHERE [Invoice
Detail].StyleNo=A.StyleNo)));
Please let me know
Thank you
abe