data new;
input Client_No$ Client_name$&20.;
cards;
1234 Julie
1234 Julie Tremblay
4567 George
5678 Alex
5678 Alexander
9123 Bob
;
run;
proc sort data=new;
by Client_No;
run;
How to remove duplicates thru datastep (first.and last.)
I don't see any duplicates. What would you like the result to be?
You already have it. Use a BY statement and either the first. or last. variable in a subsetting IF. After 340+ posts here, this will be child's play for you.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.