BookmarkSubscribeRSS Feed
BrahmanandaRao
Lapis Lazuli | Level 10

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.)

2 REPLIES 2
Astounding
PROC Star

I don't see any duplicates.  What would you like the result to be?

Kurt_Bremser
Super User

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.

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 822 views
  • 0 likes
  • 3 in conversation