/*合并所有数据库,放在work逻辑库中*/
proc sql;
create table control as
select distinct
a.stkcd, a.accper,a.accperyy,
b.pay_top3,
c.shrcr1,c.shrcr3,
d.zongshizhi,
e.ind, e.ind_2code, e.baohu, e.polution,
f.zichan, f.fuzhai,
h.tobinq_a, h.tobinq_b, h.tobinq_c, h.tobinq_d, h.bm_1, h.bm_2,
i.inc_oper,
j.zhouqi_a, j.zhouqi_b, j.zhouqi_c, j.gudongquanyizhouqi_a, j.gudongquanyizhouqi_b, j.gudongquanyizhouqi_c,
k.ocf, k.fcf,
from
cont.earning a, cont.gaoguanxinchou b, cont.guquanjizhong c,
cont.shizhi d, cont.indcd_new e, cont.lev_size f,
cont.listdt g, cont.tobinq h, cont.inc_oper i,
cont.zhouqi j, cont.fcf k
where a.stkcd =b.stkcd =c.stkcd =d.stkcd=e.stkcd=f.stkcd=g.stkcd=h.stkcd =i.stkcd =j.stkcd =k.stkcd
and a.accper=b.reptdt=c.reptdt =f.accper =h.accper =i.accper =j.accper=k.year
and a.accperyy=d.year
order by stkcd;
quit;