BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi all. I merged two datasets with 2 different date variables. However some dates are the same for both variables (ex. date=12/1/07 date2=12/1/07). My question is:
Is there a way to remove the dublicate variable (and somehow keep the 1st one)?
For ex., can I say:

data all;
merge one two;
by name;
if date=date2 then remove date2;
run;

Any help would be appreciated. Thanks.
1 REPLY 1
deleted_user
Not applicable
you could try recoding so that if data= date2 then date2=. then you could remove the missing, that may work

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 22209 views
  • 0 likes
  • 1 in conversation