what is the difference between SET and MERGE?
Answer Posted / kithsiri
Data C;
Set A B;
run;
Concaternate A and B data sets and make c Data set. Then data of B data set is placed after data of A data set. If A has n1 number of observation and B set has n2 number of observation. Then C(new set has n1+n2 number of data)
Data C;
set A B;
By var1;
run;
If var1 variable is exist in both A and B data sets, in C data set rows are arrenged according to var1 variable(ascending order).
Data C;
merge A B;
By var1;
run;
Data are arrenged side by side if there are var1 in both data sets and match rows of both sets. If A data set is not matched with B then display records of A in left side and right side data is missing values. If B data is not matched with A then display records of B in right side and left side data is missing values. If there is same variable in both tables, observation of that variable of first table is replaced by observation of the same variable of second table when match observation of var1 in both tables.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
why is sas data integration studio important? : Sas-di
what is the one statement to set the criteria of data that can be coded in any step? : Sas programming
What are the prime responsibilities of data integration administrator? : Sas-di
What are the scrubbing procedures in sas?
hi all, I need the SAS DI DUMP(A00 260) for attending the certification. if any one have, pls provide it.Please Email to vrpotluri@hotmail.com. Thanks - Ramana
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 is data governance? : Sas-di
How would you invoke a macro? : sas-macro
Give some examples where proc report’s defaults are same as proc print’s defaults?
Explain append procedure?
Differentiate between sas functions and sas procedures.
how are numeric and character missing values represented internally? : Sas programming
What is the differnce between SDTM 3.1.2 to 3.1.1 version
What commands are used in the case of including or excluding any specific variables in the data set?
if you were told to create many records from one record, show how you would do this using array and with proc transpose? : Sas programming