johngordon — 2014-07-21T20:19:39-04:00 — #1
Hopefully this is a quick one.
I'm OK with standard inner joins linking a couple of tables, but what would the syntax be to query three takes like this:
LodgeID (Foreign Key to tbl_Lodges)
CountryID (Foreign Key to t/l_Countries)
So that for any given LodgeID I can display:
Lodge, Nomination and Country?
guelphdad — 2014-07-21T20:57:36-04:00 — #2
johngordon — 2014-07-21T21:06:35-04:00 — #3
I was trying outer joins, but think I might have it now, with:
SELECT * FROM nominations LEFT OUTER JOIN lodges ON nominations.LodgeID = lodges.LodgeID LEFT OUTER JOIN continents ON lodges.ContinentID = continents.ContinentID
Does that sound about right? (Where Nominations was the starting table, not Lodges)
r937 — 2014-07-22T05:00:18-04:00 — #4
unless you have a nomination in a lodge that doesn't exist, or a lodge in a country/continent that doesn't exist, use inner joins