Show null in Select Query.

J

jenn.semo

SELECT Requests.[Date Time], Requests.Status, Min(Responses.Date) AS
MinOfDate, Max(Responses.Date) AS MaxOfDate, Requests.[Request ID]
FROM Requests INNER JOIN Responses ON Requests.[Request ID] =
Responses.[Request ID]
GROUP BY Requests.[Date Time], Requests.Status, Requests.[Request ID];

Above is my query. I need to be able to view records when the
Responses table has a null value. Any idea what I need to do to get to
this point? I have very, very little experience with Access.

Thank you so much!
 
K

Ken Snell \(MVP\)

Use a LEFT JOIN:

SELECT Requests.[Date Time], Requests.Status, Min(Responses.Date) AS
MinOfDate, Max(Responses.Date) AS MaxOfDate, Requests.[Request ID]
FROM Requests LEFT JOIN Responses ON Requests.[Request ID] =
Responses.[Request ID]
GROUP BY Requests.[Date Time], Requests.Status, Requests.[Request ID];
 
J

Jenn

This absolutely worked for me. Thank you so much!
Ken said:
Use a LEFT JOIN:

SELECT Requests.[Date Time], Requests.Status, Min(Responses.Date) AS
MinOfDate, Max(Responses.Date) AS MaxOfDate, Requests.[Request ID]
FROM Requests LEFT JOIN Responses ON Requests.[Request ID] =
Responses.[Request ID]
GROUP BY Requests.[Date Time], Requests.Status, Requests.[Request ID];


--

Ken Snell
<MS ACCESS MVP>

SELECT Requests.[Date Time], Requests.Status, Min(Responses.Date) AS
MinOfDate, Max(Responses.Date) AS MaxOfDate, Requests.[Request ID]
FROM Requests INNER JOIN Responses ON Requests.[Request ID] =
Responses.[Request ID]
GROUP BY Requests.[Date Time], Requests.Status, Requests.[Request ID];

Above is my query. I need to be able to view records when the
Responses table has a null value. Any idea what I need to do to get to
this point? I have very, very little experience with Access.

Thank you so much!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top