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

i have datasets that have 30 columns. I would like clean up datasets by removing dulplicates using  _all_ and redirect the duplicate records to another dataset.

 

proc sort data=have nodupkey out=_duprecs;

by _all_;

run;

 

this code doesnt seem to do what I want.

any help on this ?

1 ACCEPTED SOLUTION

Accepted Solutions
art297
Opal | Level 21

Is the below what you are trying to do?:

data class (drop=i);
  set sashelp.class;
  do i=1 to 5;
    output;
  end;
run;

proc sort data=class nodupkey out=dups_removed dupout=_duprecs;
  by _all_;
run;

Art, CEO, AnalystFinder.com

View solution in original post

3 REPLIES 3
art297
Opal | Level 21

Is the below what you are trying to do?:

data class (drop=i);
  set sashelp.class;
  do i=1 to 5;
    output;
  end;
run;

proc sort data=class nodupkey out=dups_removed dupout=_duprecs;
  by _all_;
run;

Art, CEO, AnalystFinder.com

SASPhile
Quartz | Level 8

Exactly!

Reeza
Super User

Please mark the question answered. 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 1045 views
  • 3 likes
  • 3 in conversation