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.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: