what is the difference between SET and MERGE?

Answer Posted / sweety

Set : only support data without relation, with relation i.e
by statement it will produce error if we right like merge
statement.
Ex :
Set statement
data demo;
set dm1;
set dm2;
run;
It will produce the result same as merge , with or without
relation.

EX : data demo;
set dm1 dm2;
run;

It will produce error.

Merge : it will combine the datasets with or without
relation.

The only difference is set is not more efficient to combine
the datasets as we need to write set statement everytime.
Ex :

Merge (without relation)
data demo;
merge dm1 dm2;
run;

Merge (with relation)
data demo;
merge dm1 dm2;
by <variable name>
run;

Is This Answer Correct ?    2 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the use of proc print and proc contents?

557


What is the maximum and minimum length of macro variable

652


how many display types available in sas bi dashboard? : Sas-bi

639


what are informats in sas? : Sas-administrator

586


how to do user inputs and command line arguments in sas?

2428






What is the maximum length of the macro variable? : sas-macro

621


What do the PUT and INPUT functions do?

776


What is the use of %include statement?

619


What is the difference between %local and %global? : sas-macro

668


what is the difference between nodup and nodupkey options? : Sas programming

619


what is the difference between calculating the 'mean' using the mean function and proc means? : Sas programming

626


What is the different between functions and PROCs that calculate the same simple descriptive statistics?

1227


What is the difference between using drop = data set option in data statement and set statement?

638


What can be the size of largest dataset in SAS?

715


What are the data types that sas contain?

653