- 阅读权限
- 255
- 威望
- 0 级
- 论坛币
- 4501 个
- 通用积分
- 76.6084
- 学术水平
- 171 点
- 热心指数
- 204 点
- 信用等级
- 133 点
- 经验
- 24581 点
- 帖子
- 584
- 精华
- 1
- 在线时间
- 1862 小时
- 注册时间
- 2008-5-25
- 最后登录
- 2023-9-20
|
- data test1;
- input date1 :yymmdd10. x1;
- format date1 yymmdd10.;
- cards;
- 20190930 111
- 20190831 222
- 20190730 333
- ;
- run;
- data test2;
- input date1 :yymmdd10. x2;
- format date1 yymmdd10.;
- cards;
- 20190901 111111
- 20190801 222222
- ;
- run;
- /*方法一*/
- proc sql;
- create table test3 as
- select * from test1 full outer join test2
- on year(test1.date1)=year(test2.date1) and month(test1.date1)=month(test2.date1);
- quit;
- /*方法二*/
- proc sql;
- create table test4 as
- select * from test1 full outer join test2
- on intnx('month',test1.date1,0)=intnx('month',test2.date1,0);
- quit;
复制代码
|
-
总评分: 论坛币 + 30
学术水平 + 3
热心指数 + 3
信用等级 + 3
查看全部评分
|