BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
GN0001
Barite | Level 11

Hello team,

 

What are the methods to dedup in SAS? Can we dedup by proc sort nodup key?

 

Regards,

blueblue

Blue Blue
1 ACCEPTED SOLUTION

Accepted Solutions
ChrisNZ
Tourmaline | Level 20

> Can we dedup by proc sort nodup key?

That's probably the easiest method.

Other methods include 

proc sql select unique 

and loading a hash table.

proc sort is almost always the appropriate tool for deduping..

View solution in original post

3 REPLIES 3
ChrisNZ
Tourmaline | Level 20

> Can we dedup by proc sort nodup key?

That's probably the easiest method.

Other methods include 

proc sql select unique 

and loading a hash table.

proc sort is almost always the appropriate tool for deduping..

japelin
Rhodochrosite | Level 12

Why don't you try it anyway?

 

proc sort data=sashelp.class out=class nodupkey;
  by age;
run;


data class;
  set sashelp.class sashelp.class;
run;
proc sort data=class nodup;
  by age name;
run;

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
  • 3 replies
  • 1152 views
  • 3 likes
  • 4 in conversation