What is the difference between one to one merge and match merge? Give an example.



What is the difference between one to one merge and match merge? Give an example...

Answer / Subhas Chandra Srivastava

One-to-one merge, also known as a data merge, combines two datasets with identical variables but possibly different observations. The resulting dataset contains all unique combinations of observations from both input datasets.

Match merge uses the BY statement to specify one or more key variables in each dataset and compares them for equality. If there is a match, it merges the corresponding rows from both datasets. If not, it creates either an unmatched observation or skips the observation based on the MERGE option used (F=FILL, U=UPDATE, NEW=CREATE).

Example:

DATA merged;
MERGE dataset1 dataset2 ON key_var;
RUN;

In this example, dataset1 and dataset2 are being merged on a common key variable 'key_var'. This is an example of one-to-one merge.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SAS Interview Questions

Briefly describe 5 ways to do a "table lookup" in sas.

4 Answers   Quintiles,


Hi,by usining ptf how we have to combine (likr merge)10 datasets at a time in the oracle database(and write a macro code also)?Like this i have a douts a lot if you dont mind may please send one text mail for me(madhusudhanap16@gmail.com)?

1 Answers  


how can u import .csv file in to SAS?tell Syntax?

7 Answers   CitiGroup, Franklin Templeton,


what are input dataset and output dataset options?

6 Answers   HCL,


describe about metadata object? : Sas-di

1 Answers  


Why is a STOP statement needed for the point=option on a SET statement?

2 Answers   Quintiles,


how we can create optional or required parameters in SAS macro...

5 Answers   TCS,


explain the use of % includes a statement in sas? : Sas-administrator

1 Answers  


explain the proc in sas? : Sas-administrator

1 Answers  


Hi im new to sas. I have a file with some charecter variables and some numeric variables now i want to load charecter variables into one datastep and numeric variables into another data step pls let me know Thanks

2 Answers  


Describe the ways in which you can create a macro variable?

1 Answers  


I have a dataset concat having variable a b & c. How to rename a b to e & f?

1 Answers  


Categories