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 / reddy
data both left_only right_only;
merge dataset1(in=a) dataset2(in=b);
by variable;
if a and b then output both;
if a and not b then output left_only;
if b and not a then output right_only;
run;
i think these is the easy way of writing the code,if any
one nows other please specify.thanks!
| Is This Answer Correct ? | 11 Yes | 4 No |
Post New Answer View All Answers
What are the different operating system platforms in which we can use sas? : sas-grid-administration
what is sas database server? : Sas-di
What is the difference between %put and symbolgen? : sas-macro
explain what is data set in sas? : Sas-administrator
What are the table names in oracle database...?
What are the difference between ceil and floor functions in sas?
What is the role of administrative users? : sas-grid-administration
If you could design your ideal job, what would it look like?
Differentiate between sas functions and sas procedures.
why is sas data integration studio important? : Sas-di
Have you used macros? For what purpose you have used? : sas-macro
Mention common programming errors committed in sas ?
If you were told to create many records from one record, show how you would do this using array and with proc transpose?
what is sas metadata repository? : Sas-bi
What is the order of application for output data set options, input data set options and SAS statements?