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