BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi All,

My question is ;

I merge two tables one has some 380 observations&4 variables & other has 2580 obs & 6 varaibles. I need to combine these tables by only common variable. But that variable should have only those values that corresponds to the true value of another variable in the 1st table. But if I merge these two tables I get the output as what I wanted but the records of the first table gets repeated for the consecutive values for which it is null for the corresponding values in the second table.
This mite b little confusion- just to make it simple is there anyways to remove the consecutive duplicate records of the merged tables for only 3 consecutive variables.
I hope I made my point clear. It would be nice if someone can get me some solution.
Thanks in advance.
1 REPLY 1
Doc_Duke
Rhodochrosite | Level 12
Sorry, it's not clear at all. Perhaps if you could show an example of two data sets with what you are getting a what you want to get, we could help.

If you are using a DATA step MERGE, you should read the that section of the reference manual carefully; the details are important.

If you are using PROC SQL, read read the similar sections on the types of JOINS. The rules for combining aren't 100% identical.

Doc Muhlbaier
Duke

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Health and Life Sciences Learning

 

Need courses to help you with SAS Life Sciences Analytics Framework, SAS Health Cohort Builder, or other topics? Check out the Health and Life Sciences learning path for all of the offerings.

LEARN MORE

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