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...


When merging 2 datasets with a common variable (not merge
key), how to keep both?

Answers were Sorted based on User's Feedback



When merging 2 datasets with a common variable (not merge key), how to keep both?..

Answer / reshma

data newdata;
merge dataset1 (in=a) datset2 (in=b);
if a or b;
by commonvar;
run;

Is This Answer Correct ?    7 Yes 2 No

When merging 2 datasets with a common variable (not merge key), how to keep both?..

Answer / vigneshwaran.s

Rename the variable in First data or in The Second Data:

Like,

Merge A(rename=(comman_var=New_var))(in=x)
B (in=y);
by New_var;
Run;

Is This Answer Correct ?    4 Yes 0 No

When merging 2 datasets with a common variable (not merge key), how to keep both?..

Answer / madhavi.nowduru@gmail.com

set dataset1 dataset2;
by var;

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More SAS Interview Questions

AE datasets names? how many types?

0 Answers   Accenture,


which domain is better in sas? clinical trails or banking

3 Answers  


How many versions came upto now in SAS?

3 Answers   CTS, TCS,


What are the different servers in sas? : sas-grid-administration

0 Answers  


explain the difference between alternate key, business key, foreign key, generated key, primary key, retained key and surrogate key ? : Sas-di

0 Answers  


What is connection profile? : sas-grid-administration

0 Answers  


The Lion King is hosting an animal conference. All the animals in the world attend except one. Which animal does not attend?

6 Answers   Oracle,


What is a post baseline?

1 Answers  


If reading an external file to produce an external file, what is the shortcut to write that record without coding every single variable on the record?

4 Answers  


Which are the statements whose placement in the data step is critical?

0 Answers  


How many data types are there in SAS?

0 Answers  


What are TEAEs

2 Answers   Accenture, Quintiles,


Categories