BookmarkSubscribeRSS Feed
deleted_user
Not applicable
What's up guys?

What's the difference between interleaving and Match Merging? It seems to me that, besides the syntax difference, their functions are exactly the same.

P.S. Don't copy the links to the explanations. ty
3 REPLIES 3
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
This sounds like an interview question I've seen many times before - interleave uses SET (with or without a BY) and match-merge uses MERGE statement (with a BY statement, to achieve the match).

And, the results are very much different - suggest the OP try it with the SASHELP "sample" dataset members and use various self-diagnostic techniques, such as PROC PRINT and use a PUTLOG _ALL_; statement in the DATA step where using the SET/MERGE statements.

Scott Barry
SBBWorks, Inc.

Suggested Google advanced search arguments, this topic / post (clearly optional and no doubt extra-credit -- notice no links were contributed, nor harmed with this post-reply):

data step programming set merge site:sas.com

data step programming by group processing site:sas.com Message was edited by: sbb
art297
Opal | Level 21
William,

You either already have received the answer to your question or you asked the wrong question. I'm going to assume the latter although I really can't recall what the following merging type is called.

If you were asking what the difference was between merging with NO by statement, and the equivalent of merging by using two set statements with NO by statement, then I think that the answer is basically none.

That is, if the following code represents what you were asking:

data want1;
merge have1 have2;
run;

data want2;
set have1;
set have2;
run;

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 2473 views
  • 0 likes
  • 4 in conversation