Still Getting SQL Syntax Error

W

Wantula

I had posted a question on SQL syntax error, unfortunately Im still getting
the the same error even after correcting it as advised by Mathias Klaey and
John Vinson.
What could be the other problem?, should I re-post exactly what Im trying to
achieve?

Please help.
 
B

Brian Camire

You might try:

SELECT Stock.Item, Sum(Stock.Quantity),
Sum(Sales.[Item Bought])
FROM Stock INNER JOIN Sales ON Stock.Item = Sales.[Item Bought]
GROUP BY Stock.Item

However, if there's a one-to-many relation between Stock and Sales, you are
going to double-count Stock.Quantity, which may not be what you want.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top