zhangyanecho 发表于 2017-6-20 10:56
非常感谢。等待热心人展示程序。
不好意思,最近较忙,代码就是很简单的sql表连接,你参考一下吧。
- proc sql noprint;
- create table b as select t1.*,
- (t2.B001101000-t1.B001101000)/t1.B001201000 as y
- from test.a as t1 left join test.a as t2
- on t1.stkcd=t2.stkcd and year(t1.Accper)>=2002 and 365>t2.Accper-t1.Accper>270
- order by 1,2;
- quit;
复制代码