How would you delete duplicate observations?

Answer Posted / srinivas

there 3 options to delete duplicate obs
1. nodup
2. nodupkey
3.noduprec

if a entire record is duplicated in sense we use nodup of
nodup rec in proc sort procedure.
proc sort data=dsn nodup/noduprec;
by var;
run;


if a variable is repeated not a entire record . this time
we use nodupkey

proc sort data=dsn nodupkey;
by var;
run;

ex; in a dataset empid is repeated then use this syn. and
the empid is used in by var statement.

Is This Answer Correct ?    19 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

1566


What are the data types in sas?

613


How can you limit the variables written to output dataset in data step?

757


name the scheduler for scheduling job and explain the scheduler? : Sas-di

598


what is sas olap server? : Sas-di

689






hi tell be about pfizer? how to compare the work with other companies ? please tell me how to login and work also?

1665


What are the default statistics for means procedure?

648


What are the 3 components in sas programming?

729


How substr function works in sas?

703


What are the prime responsibilities of data integration administrator? : Sas-di

591


What are the statements that are executed only?

676


What are the special input delimiters used in SAS?

656


what is ae onset date n what is RDS

1939


What are the new features included in the new version of SAS Programming Language?

741


: and & modifiers.

866