/*4. Data步使重复数据集的记录不重复*/
proc sort data=ex;
by a b c ;
run;
/*对原代码稍作修改后*/
data ex1 ex2;
set ex;
by a b c;
retain n 0;
if first.c then do;
n=1;
output ex1;
end;
else n+1;
if last.c and n ge 2 then output ex2;
run;作者: shiyiming 时间: 2013-9-27 11:17 标题: Re: SAS中如何删除重复记录 嗯,学到东西了。谢谢。作者: shiyiming 时间: 2013-9-27 14:17 标题: Re: SAS中如何删除重复记录 sql
select distinct from 就行作者: Emma 时间: 2016-5-17 22:34