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

What are some problems you might encounter in processing missing values? In Data steps? Arithmetic? Comparisons? Functions? Classifying data?

1 Answers   Quintiles,


How you can read the variables that you need?

0 Answers  


what is validvarname and varnum? why we are using this options; explain with a syntax for this options?

1 Answers   Max India,


Hi im new to sas. I have a file with some charecter variables and some numeric variables now i want to load charecter variables into one datastep and numeric variables into another data step pls let me know Thanks

2 Answers  


What is the difference between INPUT and INFILE ?

0 Answers  


What are all the problems you faced while validating tables and reports?

0 Answers   Accenture, Quintiles,


Name the option to produce a frequency line items rather that a table.

2 Answers  


which features do you use to check the data validations and errors? : Sas-administrator

0 Answers  


What do the sas log messages “numeric values have been converted to character” mean? What are the implications?

0 Answers  


What makes sas stand out to be the best over other data analytics tools?

0 Answers  


what are informats in sas? : Sas-administrator

0 Answers  


How to convert a given date value into SAS date

9 Answers   CitiGroup, Quintiles,


Categories