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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
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.