Giocanni, next time you have a question pleasepost in this formatsuch as you provide proper and accurate sample data--Prepare sample dataDECLARE @Travels TABLE ( TravelID INT, DeparturePortID INT, ArrivalPortID INT )INSERT @Travels ( TravelID, DeparturePortID, ArrivalPortID )SELECT 1, 1, 4 UNION ALLSELECT 2, 3, 2 UNION ALLSELECT 3, 4, 5DECLARE @Ports TABLE ( PortID INT, PortLocation VARCHAR(40) )INSERT @Ports ( PortID, PortLocation )SELECT 1, 'London' UNION ALLSELECT 2, 'Le Havre' UNION ALLSELECT 3, 'New York' UNION ALLSELECT 4, 'La Rochelle' UNION ALLSELECT 5, 'Zeebrugge'
If you do this, we can easily provide you with a query like thisSELECT t.TravelID, d.PortLocation AS Departure, a.PortLocation AS ArrivalFROM @Travels AS tINNER JOIN @Ports AS d ON d.PortID = t.DeparturePortIDINNER JOIN @Ports AS a ON a.PortID = t.ArrivalPortID
E 12°55'05.25"N 56°04'39.16"