liuyingbei 发表于 2012-5-18 12:28 
inner join只把两者共有的连接,按照LZ的意思,应该是full join吧,或者用data merge by也好。
proc sql;
create table merge as
select coalesce(a1.gaoxiao,a2.gaoxiao) as gaoxiao, coalesce(a1.zhuanye,a2.zhuanye) as zhuanye,year,fenshu,denji
from a1 full join a2
on a1.gaoxiao=a2.gaoxiao and a1.zhuanye=a2.zhuanye;
quit;