Join results of Unmatched query with a matched query to include Null (1 Viewer)

Little_Anj

Registered User.
Local time
Today, 23:04
Joined
Dec 14, 2012
Messages
25
I am trying to do the good 'ol sales report (query) to include customers with no sales.
I have a customers table, account number table, sales table & sales (line) detail table. (all linked in that order)

If I run a query to show customers (in the customer table) with account numbers, that works
An unmatched query to show customer without an account number works (but of course the unmatched account number field isn't shown).

How can I get the two two be shown together with the "unmatched" having a null or 0 for their account number?

I am guessing in principle, the resulting solution can be modified to show customers without sales alongside those with sales?
 

recyan

Registered User.
Local time
Today, 18:34
Joined
Dec 30, 2011
Messages
180
Check keyword "LEFT JOIN".
Edit : along with Nz().

Thanks
 

Little_Anj

Registered User.
Local time
Today, 23:04
Joined
Dec 14, 2012
Messages
25
Thanks heaps Recyan, they were some really helpful tips.
 

recyan

Registered User.
Local time
Today, 18:34
Joined
Dec 30, 2011
Messages
180
Glad you found it helpful.

Thanks :)
 

Users who are viewing this thread

Top Bottom