I have a table with 3 columns in my table Travel (and of course some more):
AirportFrom, AirportTo, AirportFound.
The columns above display ID's from airports. In the table Airports are 2 columns AirportID and AirportName. Instead of displaying the ID's from the airports I want to display the AirportNames.
But when I use:
SELECT id
, AirportFrom
, Airports.Airportname
, AirportTo
, Airports.Airportname
, AirportFound
, Airports.Airportname
FROM Travel
LEFT
JOIN Airports
ON AirportTo = Airports.AirportID
-- LEFT JOIN Airports ON AirportFrom = Airports.AirportID
-- LEFT JOIN Airports ON AirportFound = Airports.AirportID
It only displays the airport name of the first join in every column. I want to show the airport name for each of the 3 joins