I want to compare these two datasets and want an output, which says id 3 has different size when compared and id 2,4,5 has same size for both the datasets.
data a;
input id size ;
cards;
1 3
2 4
3 5
4 6
5 7
;
data b;
input id size;
cards;
2 4
3 6
4 6
5 7
;
proc sql;
create table want as
select a.*,ifc(a.size=b.size,'same','different') as remark
from a a,b b
where a.id=b.id;
quit;