How would you code a merge that will write the matches of
both to one data set, the non-matches from the left-most
data set to a second data set, and the non-matches of the
right-most data set to a third data set.
Answer Posted / proc sql
proc sql:
proc sql;
create table sqln1 as select one.id,name,age,sex from one
inner join two on one.id=two.id;
create table sqln2 as select one.id,name,age,sex from one
left join two on one.id=two.id where two.id is null;
create table sqln3 as select two.id,name,age,sex from one
right join two on one.id=two.id where one.id is null;
quit;
Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
What are the prime responsibilities of data integration administrator? : Sas-di
Explain the purpose of substr functions in sas programming.
do you need to know if there are any missing values? : Sas programming
How we can call macros with in data step? : sas-macro
Give some examples where proc report’s defaults are different than proc print’s defaults?
What is the sas data set? : sas-grid-administration
What is a method for assigning first.VAR and last.VAR to the BY group variable on unsorted data?
How to read an input file in sas?
What is the difference between nodupkey and nodup options?
AE datasets names? how many types?
How to specify variables to be processed by the freq procedure?
how would you determine the number of missing or nonmissing values in computations? : Sas programming
What is the use of the %include statement?
why a stop statement is needed for the point= option on a set statement?
for what purpose would you use the retain statement? : Sas programming