troubleshooting Question

How can I include NULL records in my query?

Avatar of Chadd C
Chadd C asked on
Microsoft Access
2 Comments2 Solutions285 ViewsLast Modified:
I have two tables:

Loaded Questions: contains all the questions in my survey (as well as targeted sample size). Structure is:
Question_ID (unique/primary key)
Issue (serves as the category)
Question (the question)
Sample_Size (total number of responses we need for that particular question)

cs13_qc: contains all the responses
Question  (unique/primary key associated with Question_ID for the question (In Loaded Questions).
Response (response)


What I am attempting to accomplish is a query that will list ALL the questions loaded in the "Loaded Questions" table and their targeted sample size, a [count] of associated responses to each question listed in the cs13_qc table, and a calculation of the difference [status].  Here is my code thus far:

SELECT [Loaded Questions].Question_ID, [Loaded Questions].Issue, [Loaded Questions].Question, [Loaded Questions].Sample_Size, Count(cs13_qc.Question) AS [Count], [Count]-[Sample_Size] AS Status
FROM [Loaded Questions] INNER JOIN cs13_qc ON [Loaded Questions].Question_ID = cs13_qc.Question
GROUP BY [Loaded Questions].Question_ID, [Loaded Questions].Issue, [Loaded Questions].Question, [Loaded Questions].Sample_Size, [Count]-[Sample_Size];

All seems to work expect that the query only lists those questions that have received a response. Those questions that have no response are not appearing in the query. How do I fix it so that they appear with a value of "0"?
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 2 Answers and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros