I would probably use this approach: proc sql ; create table want as select coalesce(main2.key, minor2.key) as key from (select key , 1 as mainflag from main ) as main2 full join (select key , 1 as minorflag from minor) as minor2 on main2.key EQ minor2.key where n(mainflag, minorflag) EQ 1 ; quit ; Some of the other techniques might encounter difficulties when there are composite keys when there are missing-values in the keys when there are satellite variables littlestone wrote: Thank you. Is it possible to do the task using JOIN method?
... View more