The SAS Output Delivery System and reporting techniques

How to remove duplicate observation through only datastep?

Reply
Frequent Contributor
Posts: 88

How to remove duplicate observation through only datastep?

Hi All,

want to remove duplicate observation from data set only in data  step not using any proc not even proc SQL, can we do that?

can first. and last, variable will help in this case? any other way please let me know.

Grand Advisor
Posts: 17,332

Re: How to remove duplicate observation through only datastep?

How are you defining a "DUPLICATE" and how many variables?

And why...

Frequent Contributor
Posts: 88

Re: How to remove duplicate observation through only datastep?

Duplicate like below one suppose Test is my dataset then

id    Name  address

===============

1     xyz       St  stef road

1     xyz       St  stef road

2     abc       St  josef raod

2     abc       St  josef road

3     pqr        mery road

now all i want to remove duplicare rows like id 1 and 2 and want to keep only single one.. like

id    Name  address

===============

1     xyz       St  stef road

2     abc       St  josef raod

3     pqr        mery road

Grand Advisor
Posts: 17,332

Re: How to remove duplicate observation through only datastep?

Ask a Question
Discussion stats
  • 3 replies
  • 271 views
  • 0 likes
  • 2 in conversation