Help using Base SAS procedures

How to delete the replicated data in a dataset

Accepted Solution Solved
Reply
Contributor
Posts: 65
Accepted Solution

How to delete the replicated data in a dataset

Hello,

I've merged two datasets. However, there exist lots of replicated observations in the merged dataset. How can I say to just keep one of the observations with the same value for all the variables?

I appreciate your help in advance.


Accepted Solutions
Solution
‎11-28-2014 09:18 AM
Super User
Posts: 5,424

Re: How to delete the replicated data in a dataset

If you merged the tables using the data step MERGE BY, you could probably use if first. logic.

Otherwise use a subsequent PROC SORT with NODUPKEY option.

Data never sleeps

View solution in original post


All Replies
Solution
‎11-28-2014 09:18 AM
Super User
Posts: 5,424

Re: How to delete the replicated data in a dataset

If you merged the tables using the data step MERGE BY, you could probably use if first. logic.

Otherwise use a subsequent PROC SORT with NODUPKEY option.

Data never sleeps
🔒 This topic is solved and locked.

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

Discussion stats
  • 1 reply
  • 186 views
  • 0 likes
  • 2 in conversation