Forum Discussion

chris-thompson's avatar
4 years ago
Solved

How to Append Tables Based on a Condition

Hi there:

 

I have 2 tables containing participants for multiple events that we have hosted.  One table contains specific session by session attendance by individual ONLY for events that have multiple sessions.  The other table contains overarching event individual attendance across all events that were hosted (i.e. it includes BOTH events that are a single session AND those that are multiple sessions, but it does not break down which sessions an individual attended).  Overall, I want all of the attendance information combined into one table, so I would imagine that I need to append these 2 tables together.  HOWEVER, the 2nd table includes attendance across all events, and I only want to add the attendance to the single session events from the second table to the attendance for multiple session events in the first table.  How can I append them so it includes everything from the first table and only a subset of information from the second table? 

  • Vijay_A_Verma's avatar
    Vijay_A_Verma
    4 years ago

    I have performed one Right Anti join. This join removed the matching rows from second table.

    Removed all columns and expanded the table.

    Now, I have a table which is having common rows removed from second table.

    Appended this result to Output of Changed Type which was our original table.

    Replace null in Session with Single-session.

9 Replies