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
Which command is used to perform sorting in sas program?
Mention what is SAS data set?
Explain what is data step?
how do you pull data from equifax?tell me the process?
Describe the function and utility of the most difficult SAS macro that you have written?
what versions of sas have you used (on which platforms)? : Sas programming
what are _numeric_ and _character_ and what do they do? : Sas programming
What are the different versions of sas that you have used until now? : sas-grid-administration
What commands are used in the case of including or excluding any specific variables in the data set?
name the scheduler for scheduling job and explain the scheduler? : Sas-di
what is proc Index? and what is proc document?
How would you define the end of a macro?
In sas, what are the areas that you are most interested in? : sas-grid-administration
how to create the AE dataset by using SDTMIG specifications and SAP plan by using UNIX platform?
How necessary is it to be creative in your work?