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 / m.sivakumar
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 coalesce(one.id,two.id)as
id,name,age,sex from one right join two on one.id=two.id
where one.id is null;
quit;
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How can you create a macro variable with in data step? : sas-macro
Explain by-group processing?
explain about sas business intelligence? : Sas-bi
How to create list output for cross-tabulations in proc freq?
what is sas data set?
What does the RUN statement do?
Explain bmdp procedure?
Explain how merging helps to combine data sets.
how to debug and test the sas program? : Sas-administrator
If you were told to create many records from one record, show how you would do this using array and with proc transpose?
Explain what Proc glm does?
explain the proc in sas? : Sas-administrator
How to create a permanent sas data set?
What is proc sort?
what are some differences between proc summary and proc means? : Sas programming