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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

New Learning Events in April

 

Join us for two new fee-based courses: Administrative Healthcare Data and SAS via Live Web Monday-Thursday, April 24-27 from 1:00 to 4:30 PM ET each day. And Administrative Healthcare Data and SAS: Hands-On Programming Workshop via Live Web on Friday, April 28 from 9:00 AM to 5:00 PM ET.

LEARN MORE

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