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 is the difference between: x=a+b+c+d; and x=sum (of a, b, c ,d);? : Sas programming

613


why is a stop statement needed for the point=option on a set statement? : Sas programming

591


What is the general format of function in sas? : sas-grid-administration

573


what is sas business intelligence? : Sas-bi

593


Describe the function and untility of the most difficult SAS macro that you have written.

1731






what is sas metadata repository? : Sas-bi

608


How is character variable converted into numeric variable and vice versa?

602


Explain how merging helps to combine data sets.

618


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.

1803


How are numeric and character missing values represented internally?

1141


How will you react when, while consulting a SAS documentation manual to get an answer to a problem, someone says hey, I thought you were supposed to know all that stuff already, and not have to look it up in a book?

1948


Have you used macros? For what purpose you have used? : sas-macro

564


Tell me about % include and % eval? : sas-macro

683


how many types prompting framework can be broken down to? : Sas-bi

637


What is program data vector (pdv)?

637