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.

Ready to join fellow brilliant minds for the SAS Hackathon?

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

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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