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 is data integration? : Sas-di
Difference between informat and format?
Name validation tools used in SAS
If you use a symput in a data step, when and where can you use the macro variable? : sas-macro
What is the use of stop statement?
What are the different operating system platforms in which we can use sas? : sas-grid-administration
Name some categories in sas 9? : sas-grid-administration
For clinical entire study how many tables will create approx?
which features do you use to check the data validations and errors? : Sas-administrator
Mention what is SAS data set?
name several ways to achieve efficiency in your program? : Sas programming
Are you involved in writing the inferential analysis plan? Tables specfications?
explain the main difference between the nodup and nodupkey options? : Sas-administrator
What are the features of base sas system?
What are the implications?