Sorez
Sorez

Reputation: 19

Stuck with a simple issue on SQL Query on Microsoft Access that I can't figure out, showing both empty and filled fields

I have two tables, one of them listing Game Titles, and the other listing the Date it was purchased. I need the Query to still show games that were not purchased with an empty field, while listing the game in the next column.

Current Code:

SELECT Game.Title, GameOrder.[Date Purchased]
FROM Game INNER JOIN GameOrder ON Game.[Game ID] = GameOrder.[Game ID]
ORDER By [Date Purchased] ASC;

Tried looking online everywhere and I can't seem to find a solution for it, would really appreciate some help on this one thing!

Upvotes: 0

Views: 37

Answers (1)

Tolu Talabi
Tolu Talabi

Reputation: 26

From your image, if you want to show null fields for values that are not present in GameOrder, you need a Left Outer Join and not an INNER JOIN like you've used.

Upvotes: 1

Related Questions