比如说你用merge或set语句把你的记录合并后,生成个具有重复记录放表,然后你在用sql语句修改表就行了,举个例子:
data a;
input hhid x@@;
cards;
1 2
2 3
1 4
;
run;
proc sort data=a;
by hhid;
run;
data b;
input hhid x@@;
cards;
1 2
2 3
3 5
;
run;
proc sort data=b;
by hhid;
run;
data new;
set a b;
by hhid;
run;
proc sql;
create table final as
select distinct new.*from new;
quit;