Count Null records AND...... (1 Viewer)

Matizo

Registered User.
Local time
Yesterday, 19:34
Joined
Oct 12, 2006
Messages
83
Hi guys,

I know how to count records so that null records would be counted but I do not know how to do this:

I have customers and works. I want to create a query that will show ALL customers and number of works done for that customer (sometimes there is no work done for customer).

How can I do it?

Thanks,
Matt
 

Moniker

VBA Pro
Local time
Yesterday, 21:34
Joined
Dec 21, 2006
Messages
1,567
Assuming you have a normalized structure, that's a left join between the customer table and the works table.

Customer Table
CustomerID (PK)
CustomerName
OtherCustomerInfo

Works Table
CustomerID --/ (Both are PK)
WorksID ----/
WorksName
OtherWorksInfo

LEFT JOIN Customer Table to Works Table on the CustomerID field to get the results you want.
 

Matizo

Registered User.
Local time
Yesterday, 19:34
Joined
Oct 12, 2006
Messages
83
Thanks! It works:)

regards,
Matt
 

Users who are viewing this thread

Top Bottom