DATA Step, Macro, Functions and more

Erase identical lines in data set

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 115
Accepted Solution

Erase identical lines in data set

This question goes with no example:

i would like you to help me to code how can i erasa identical datalines in data set, 

 

The situation is critical, cause i have 1000 lines and 15 columns, therefore manually would be impossible, or take at leats 1 week straight.

 

in the colums i have alphanumeric ($) and numeric values.

 

Thanks


Accepted Solutions
Solution
‎03-01-2018 10:01 AM
Super User
Posts: 6,939

Re: Erase identical lines in data set

Posted in reply to jonatan_velarde

An easy way:

 

proc sort data=have out=want nodupkey;

by _all_;

run;

View solution in original post


All Replies
Solution
‎03-01-2018 10:01 AM
Super User
Posts: 6,939

Re: Erase identical lines in data set

Posted in reply to jonatan_velarde

An easy way:

 

proc sort data=have out=want nodupkey;

by _all_;

run;

SAS Super FREQ
Posts: 831

Re: Erase identical lines in data set

Posted in reply to jonatan_velarde

Use the DISTINCT keyword within Proc SQL SELECT

 

Proc SQL;
  create table want as
  select distinct
    *
  from
    have
  ;
quit;
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 128 views
  • 4 likes
  • 3 in conversation