Advertisement

01.29.2007 at 11:55AM PST, ID: 22141104
[x]
Attachment Details

How does one make a Left Join return a zero count?

Asked by GrahamSkan in Microsoft Access Database

Tags: join, left, access, count, zero

I am trying to join two tables which have a common ID so that the count of matching records, including 0 is returned. It is that 0 count that I cannot achieve. The ID (EventType) is unique in one table, but not in the other, where it is called EVENT_TYPE in the SQL below. One of the other fields in the table with multiple entries must equal a supplied value - 316 in the SQL.

This is my SQL - straight out of the Access query designer.

SELECT EventNames.EventName, Count(EventNames.EventType) AS CountOfEventType, [Individual Events].Date
FROM EventNames LEFT JOIN [Individual Events] ON EventNames.EventType = [Individual Events].EVENT_TYPE
GROUP BY EventNames.EventName, [Individual Events].MEMBER_ID, [Individual Events].Date
HAVING ((([Individual Events].MEMBER_ID)=316));

Start Free Trial
 
Loading Advertisement...
 
[+][-]01.29.2007 at 12:42PM PST, ID: 18422741

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.29.2007 at 02:21PM PST, ID: 18423540

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.29.2007 at 02:29PM PST, ID: 18423581

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.29.2007 at 03:48PM PST, ID: 18423962

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.30.2007 at 04:32AM PST, ID: 18427014

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]01.30.2007 at 04:38AM PST, ID: 18427080

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.30.2007 at 06:09AM PST, ID: 18427655

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.30.2007 at 06:37AM PST, ID: 18427857

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Access Database
Tags: join, left, access, count, zero
Sign Up Now!
Solution Provided By: LPurvis
Participating Experts: 2
Solution Grade: A
 
 
[+][-]01.30.2007 at 07:02AM PST, ID: 18428066

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.30.2007 at 07:18AM PST, ID: 18428241

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.30.2007 at 08:43AM PST, ID: 18428936

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32