How would you delete observations with duplicate keys?
Answer Posted / upendra
Data <datasetname>;
Set <datasetname>;
by <var>;
If last.var;
run;
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What do you understand by the term Normal Distribution?
What are pdv and it functions?
What is the difference between using drop = data set option in data statement and set statement?
What are the statements in proc sql?
What are the differences between sum function and using “+” operator?
how would you determine the number of missing or nonmissing values in computations? : Sas programming
What are the differences between proc means and proc summary?
what is factor analysis? : Sas-administrator
In proc transpose and data step with arrays which one you pick?
how does sas handle missing values in a merge? : Sas programming
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.
what are 5 ways to perform a table lookup in sas? : Sas-administrator
What is the function of Stop statement in a SAS Program?
Describe the function and untility of the most difficult SAS macro that you have written.
what are input dataset and output dataset options? : Sas programming