When merging 2 datasets with a common variable (not merge
key), how to keep both?
Answer Posted / madhavi.nowduru@gmail.com
set dataset1 dataset2;
by var;
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
data data1; input dt account; format dt date9.; cards; 1745 1230 1756 1120 1788 1130 1767 1240 ; data data2; input startdt enddt total; format startdt date9. enddt date9.; cards; 1657 1834 12300 1557 1758 16800 1789 1789 12300 1788 1345 12383 1899 1899 13250 ; proc sql; create table data3 as select * from data1 as x left join data2 as y on x.dt>=y.startdt and x.dt<=y.enddt; quit; Here, we are getting cartision product. But,I want left join report consisting of this program. It should not get duplicate values. you can modify the program also.
Explain data_null_?
Describe the function and untility of the most difficult SAS macro that you have written.
What are the statements that are executed only?
what is a method for assigning first.var and last.var to the by groupvariable on unsorted data? : Sas programming
What is PROC in SAS?
Mention what is PROC in SAS?
How does proc sql work?
What are the differences between proc means and proc summary?
Explain the purpose of substr functions in sas programming.
List out some key concept of SAS
what type of graphs we will create(for 2+years candidates)?
What is SAS informats?
is data integration and etl programming is same? : Sas-di
what is star schema? : Sas-di