Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How would you code a merge that will keep only the
observations that have matches from both sets.

Answers were Sorted based on User's Feedback



How would you code a merge that will keep only the observations that have matches from both sets...

Answer / nishant

Using "IN" variable option. Look at the following example.

data three;
merge one(in=x) two(in=y);
by id;
if x=1 and y=1;
run;

Is This Answer Correct ?    13 Yes 1 No

How would you code a merge that will keep only the observations that have matches from both sets...

Answer / pallavi

data three;
merge one(in=x) two(in=y);
by id;
if x and y;
run;

Is This Answer Correct ?    13 Yes 1 No

How would you code a merge that will keep only the observations that have matches from both sets...

Answer / madhavi

proc sort data=one;
by id;
run;
proc sort data=two;
by id;
run;
data comm_rec;
merge one(in=a) two(in=b);
by id;
if a and b;
run;
proc print data=comm_rec;
run;

Is This Answer Correct ?    11 Yes 0 No

How would you code a merge that will keep only the observations that have matches from both sets...

Answer / sheetal

Using joins in proc sql statement, see following example

proc sql;
select *
from a, b
where a.case_id = b.case_id;
quit;

Is This Answer Correct ?    6 Yes 1 No

How would you code a merge that will keep only the observations that have matches from both sets...

Answer / kamudu

here we used simple answer ia
data merge;
merge(tables------);
by (same colum);
if e1 and e2 then
output;
keep-----;
run;

Is This Answer Correct ?    0 Yes 5 No

Post New Answer

More SAS Interview Questions

Mention how to limit decimal places for the variable using proc means?

0 Answers  


What are the rows present in protocol Violation table?

2 Answers   Accenture, Quintiles,


Do you think professionally?

1 Answers   Oracle,


The below code we are using for creating more than one macro variables in proc sql using into clause. How we can use same code to create macro variables vara, varb, varc instead of var1, var2, var3.? proc sql noprint; select count(distinct(patient)) into :var1 - :var3 from dataset1 group by trtreg1c ; quit;

1 Answers   Accenture,


Briefly describe 5 ways to do a "table lookup" in sas.

4 Answers   Quintiles,


How do i read multiple spaces in datasets?

4 Answers   Quintiles,


What is a post baseline?

1 Answers  


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.

0 Answers  


What is a method for assigning first.VAR and last.VAR to the BY group variable on unsorted data?

0 Answers   Quintiles,


how can you create zero observation dataset? : Sas programming

0 Answers  


what is portability of sas programmes?

2 Answers   Capital One,


What is the difference between %local and %global?

1 Answers  


Categories