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
Did you used proc test? when?
what is the purpose of _error_? : Sas programming
Is the physical structure of the data set in the same orientation as the report? Do you need to reshape the data sets? What method should you use to reshape the data–DATA steps,PROC TRANSPOSE,output data set from a procedure?
what is PhaseIII, ODS, TLG, Macro and Proc in SAS
What are the different types of sas functions?
Which statement does not perform automatic conversions in comparisons?
What is the difference between order and group variable in proc report?
What is the purpose of trailing @ and @@? How do you use them?
What are the special input delimiters used in SAS?
What are the implications?
Describe a time when you were really stuck on a problem and how you solved it?
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 the benefits of data integration? : Sas-di
Why and when do you use proc sql?
What are all the problems you faced while validating tables and reports?