Forum Discussion

ssbagley's avatar
ssbagley
Helper III
3 years ago

Merge or Append with Null Values

I have two tables and I need to combine them, but I've tried both Merge and Append, both with issues.  Append gets me closest to what I need. 

 

When I append Table 1 and Table 2 (very simplified example), I get all the rows and columns from both tables, but Null values where the tables do not have the same columns - basically duplicated rows where data is populated from one report or the other.  How can I fix it?

 

Table 1

NameEmp IDDateAmountComment

John

222

04/27/2023

5

text text
John22204/21/202310 
Susan22504/15/202317 
Susan22504/17/202322Text 

 

Table 2

NameEmp IDDateLocationAmount

John

222

04/27/2023

Dallas5
John22204/21/2023

Houston

10
Susan22504/15/2023Houston17
Susan22504/17/2023Austin22


Desired output:

NameEmp IDDateLocationAmountComment

John

222

04/27/2023

Dallas

5

text text
John22204/21/2023

Houston

10 
Susan22504/15/2023Houston17 
Susan22504/17/2023Austin22Text