Show all stores on Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a query set up that links between two tables by the store number. The
Store Table has all the store information of all 1,200 stores we call on.
The Master Table shows stores that we have sold items to for that specific
vendor. Some of the 1,200 stores from the Store Table will not have any
items sold to that store so will not have any information on the Master
Table. I want to have a query that shows every store regardless if we sold
any items to them or not so if they did not buy anything it would show the
store with a zero amount in the Inv Qty field. The query I have now only
shows the stores that have sales information in the Master table.
 
Dear Supe:

It sounds like you would want a LEFT JOIN:

SELECT *
FROM [Store Table] S
LEFT JOIN [Master Table] M
ON M.[Store Number] = S.[Store Number]

You need to first correct my spellings for tables and columns.

Tom Ellison
 

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

Back
Top