When merging 2 datasets with a common variable (not merge
key), how to keep both?
Answers were Sorted based on User's Feedback
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 |
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 |
Answer / madhavi.nowduru@gmail.com
set dataset1 dataset2;
by var;
Is This Answer Correct ? | 0 Yes | 3 No |
How experienced are you with customized reporting and use of Data _Null_ features?
i have multiple .csv files in a unix directory. every file is having variable names as header.even for empty file also. suppose take 3 files a.csv b.csv c.csv a.csv contains data as name;age,salary; raja;34;4000; ravi;33;5000; kumar;25;3000; b.csv contains data as name;age,salary; ajay;40;4500; and c.csv contains name;age,salary; (only headers) Now i want to import and append all these files in to a single dataset. i tried infile statement with *.csv to import all at a time. but i m not getting correct data. please help me . its urgent. thank you in advance
How to find out no. of business days in a month using macros.???(excluding weekends and holidays).
What do the mod and int function do? : Sas programming
How do dates work in sas?
Will it bother you if the guy at the next desk times the frequency and duration of your bathroom or coffee breaks on the grounds that ?you are getting paid twice as much as he is??
What are the differences between proc means and proc summary?
explain the difference between proc means and proc summary?
If you could design your ideal job, what would it look like?
Explain proc univariate?
which stats created by proc means that are not created by proc summary or vice versa?
What are the difference between the sas data step and sas procs?