Hi!
data test;
input id date$ var1$ var2$;
datalines;
1 20900101 abc abc2
2 20070102 cdf cdf2
2 20900101 jdk lao2
1 20110101 cds sxa
1 20150202 jui wsa
3 20900101 wer wes2
1 21000101 rte www
4 20190101 www rrr
;
run;
This is my test data set. I'm looking for a solution for keeping the specified rows. If there is a 20900101 date from a particular id, then keep it. The other rows which have the same ID just drop it or delete .
so my final table I want it to look like that:
data test;
input id date$ var1$ var2$;
datalines;
1 20900101 abc abc2
2 20900101 jdk lao2
3 20900101 wer wes2
4 20190101 www rrr
;
run;
Thanks for your help!