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 is the difference between infile and input? : Sas-administrator
How will you use the WHO Drug Dictionary for Reporting Clinical Trials?
Mention few capabilities of sas framework.
What are the special input delimiters used in SAS?
what is sas application server? : Sas-di
Are you involved in writing the inferential analysis plan? Tables specifications?
what is the use of sas management console? : Sas-di
what do you mean by data staging area? : Sas-di
what do the pad and dim functions do? : Sas programming
how would you determine the number of missing or nonmissing values in computations? : Sas programming
I have a SCD Type 2 Dimention for Location In which A Sales Office in Having two Surrogate Keys just because of the change in it's Sales Group. SKey SalesGroup Sales Office BeginDate EndDate 280 SG1 SO1 01APR2000 01APR2010 281 SG2 SO1 02APR2010 31MAR2999 Now while loading the Fact, the Lookup ir returning SKey 280 for records before and after 01APR2010. I am not able to give WHERE condition in the Lookup Properties (TranDate between BeginDate and EndDate). Please help.
How does the internal authentication work in sas? : sas-grid-administration
how would you create multiple observations from a single observation? : Sas programming
How do you delete duplicate observations in sas?
Explain the difference between informat and format with an example.