Forum Discussion

Osmento's avatar
Osmento
New Member
9 years ago
Solved

Merging table with a left outer join

Hi Everyone,

 

I have two table that I am trying to merge data in.

 

In my Travel Data table I have an Origin Code, which relates to the airport of departure.

 

In my Origin IATA Codes this is the Airport of departure code.

 

Merging these two tables with a left outer join, should give all the data from my travel data table with the updated information added from the Origin IATA codes Table.

 

 

In my travel data table every row has a Origin IATA Code (not unique) and all are valid Origin IATA Codes (unique), so it should be a straight match.

 

My data has 375109 rows and it says it matches 375109 rows.

 

When I update my changes

 

My total goes from 

 

To 

 

I don't understand why there is a difference.

 

I have compared the before and after using Excel and I can locate where a row has been duplicated as in the example below, but I can't understand why it has acted this way.

 

 

I am thinking that perhaps the join is wrong or the relationship?

 

TIA

 

  • ImkeF's avatar
    ImkeF
    9 years ago

    What is the result if you choose "Right Outer Join" instead of "Left Outer Join"?

4 Replies

    • Osmento's avatar
      Osmento
      New Member

      So the origin is from the first table and everything from AQ onwards is from the left joined merge table.  So the merge has completed but it has also duplicated the data.

       

      • ImkeF's avatar
        ImkeF
        Community Champion

        What is the result if you choose "Right Outer Join" instead of "Left Outer Join"?