[吐糟01] ResearchGate上提问的全是阿三# Biology - 生物学
s*d
1 楼
各位大神,我用下面的代码合并两个数据库,但是合并后的数据库中prices都为
missing value。请教是怎么回事啊?谢谢!
data bm;
set bm;
rename standard_and_poor_s_identifier=gvkey
historical_CRSP_permno_link_to_C=permno
data_date=date
company_name=cname
common_shares_used_to_calculate=cshr
var7=eps
Market_Value___Total=market;
format date ddmmyy10.;
cyear=year(date);
quarter=qtr(date);
run;
data mylib.prices;
set mylib.prices;
format date date9.;
cyear=year(date);
quarter=qtr(date);
run;
proc sql;
create table bm as
select a.*, b.*
from bm as a left join mylib.prices as b
on a.permno=b.permno and a.cyear=b.cyear and a.quarter=b.quarter;
quit;
missing value。请教是怎么回事啊?谢谢!
data bm;
set bm;
rename standard_and_poor_s_identifier=gvkey
historical_CRSP_permno_link_to_C=permno
data_date=date
company_name=cname
common_shares_used_to_calculate=cshr
var7=eps
Market_Value___Total=market;
format date ddmmyy10.;
cyear=year(date);
quarter=qtr(date);
run;
data mylib.prices;
set mylib.prices;
format date date9.;
cyear=year(date);
quarter=qtr(date);
run;
proc sql;
create table bm as
select a.*, b.*
from bm as a left join mylib.prices as b
on a.permno=b.permno and a.cyear=b.cyear and a.quarter=b.quarter;
quit;