How would you delete duplicate observations?

Answer Posted / vijay

There are several ways to do this. However the easliest
code-wise is to use PROC SORT. For example:

PROC SORT DATA=mydata NODUPKEY;
BY variable;
RUN;

Is This Answer Correct ?    17 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What Proc glm does?

849


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??

2366


Explain the difference between informat and format with an example.

944


what is null hypothesis? why do you consider that?

2647


What are the statements that are executed only?

915


Describe what are the different levels of administrative users in sas? : sas-grid-administration

801


how will you locate the sas platform applications? : Sas-bi

807


What is the difference between nodupkey and nodup options?

809


explain what is factor analysis? : Sas-administrator

850


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.

2038


What versions of SAS have you used (on which platforms)?

1265


What are the difference between sas functions and procedures?

863


How to import multiple xls files into sas. Out of those files, how to get different values from a single variable and how to find number of rows per value type? We can do this using group by for one xls file with proc sql. Was wondering how I can achieve this for multiple files at the same time. Any ideas?

2610


What is data _null_?

908


I am preparing SAS Certified Advanced Programmer for SAS 9 in 2014. If anybody has the latest dumps for this exam, please mail me at dhiman.mukherjee@gmail.com

2482