proc sql;
create table a as
select distinct
a.stkcd, b.accper, a.year,
if a.youxian=1 or b.gufen=1 then company=1/*如果企业为有限责任公司,或者为股份有限公司,那么company二分类变量取值为1,这个地方该怎么表述?if then 语句显然不适用*/
from temp1 as a
left join temp2  as b 
on a.stkcd=b.stkcd and a.year=b.year;
quit;