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
How would you identify a macro variable? : sas-macro
which date functions advances a date time or date/time value by a given interval? : Sas programming
How to create an external dataset with sas code?
How do you control the number of observations and/or variables read or written? Approximately what date is represented by the SAS date value of 730?
what do you mean by data staging area? : Sas-di
if a variable contain dates like "2015/01"---"2015/12" (yymm) ,How to add day to those dates,if them month is jan then 31 if the month is feb then 28 so on ...
explain the use of % includes a statement in sas? : Sas-administrator
How do you control the number of observations and/or variables read or written?
What is connection profile? : sas-grid-administration
how do you debug and test your sas programs? : Sas programming
I have a dataset concat having a variable a b & c. How to rename a b to e & f?
Differentiate between proc means and proc summary.
Explain the purpose of substr functions in sas programming.
What commands are used in the case of including or excluding any specific variables in the data set?
how many display types available in sas bi dashboard? : Sas-bi