How to show zero sales?

G

gdee

I'm new to Access and would really appreciate some help with a problem
cannot solve myself.

I have 2 tables, one with customers and the other with sales. I hav
linked the tables ok and can query customers with total sales for eac
customer.

My problem is I cannot find out how to show sales for all customers. i
I would like to see customers with no sales. The query only supplie
details of customers with a sale.

Any ideas
 
M

Marc

My problem is I cannot find out how to show sales for all customers. ie
I would like to see customers with no sales. The query only supplies
details of customers with a sale.

Any ideas?

Click on new query - then choose the last of the five options that come up -
Find Unmatched Query Wizard.
Marc
 
V

Van T. Dinh

Use LEFT JOIN(S) in your Query rather than INNER JOIN. For example, using
NorthWind, you can create a Query with an SQL String:

SELECT Customers.CustomerID, Customers.CompanyName, Orders.OrderDate,
[Order Details].UnitPrice, [Order Details].ProductID, [Order
Details].Quantity
FROM (Customers LEFT JOIN Orders ON Customers.CustomerID =
Orders.CustomerID) LEFT JOIN [Order Details] ON Orders.OrderID = [Order
Details].OrderID;

which will show all customers (including those that never ordered) and
Products ordered by customers if there are any.
 

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