Remove right join and merge record on join