I need to complie a list of customers with open orders. This one should be pretty simple but I am stummped on how to get it. I have the following query, but it returns a list of each open order for each customer, essentially listing the same customer multiple times (if they have multiple open orders). I just need to list each customer once regardless if they have 1 or 100 open orders (Open orders are defined of having a status id <>3)
In my research I have found that using a totals query will return the summary that I need. Although this techically works, it wont let me calculate totals on an asterisk (*), and I have to enter each field manually. This is not such a problem except both my customers extended table and orders table hold combined about 40 different fields and I need all of them in the results.
Is there an easier or different way to just get a non duplicated list of customers with open open orders using the asterisk(*) and not having to enter each field manually?
Code:
SELECT [Customers Extended].*, Orders.*
FROM [Customers Extended] LEFT JOIN Orders ON [Customers Extended].ID = Orders.[Customer ID]
WHERE ((Orders.[Status ID])=3);
In my research I have found that using a totals query will return the summary that I need. Although this techically works, it wont let me calculate totals on an asterisk (*), and I have to enter each field manually. This is not such a problem except both my customers extended table and orders table hold combined about 40 different fields and I need all of them in the results.
Is there an easier or different way to just get a non duplicated list of customers with open open orders using the asterisk(*) and not having to enter each field manually?