Duplicate entries in datasets

Reply
Frequent Contributor
Posts: 138

Duplicate entries in datasets

Hello all.

I am working with 2 datasets: A and B. Everyone from dataset A is also in dataset B. How can I direct SAS to delete from dataset B everyone who is also in dataset A?

Thanks!

Contributor
Posts: 51

Re: Duplicate entries in datasets

Hi,

You can use "proc sql" for your purpose,

proc sql;

  title 'B EXCEPT A';

  select * from sql.b

  except

  select * from sql.a;

Super User
Posts: 17,745

Re: Duplicate entries in datasets

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