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
what are validation tools that are used in sas? : Sas-administrator
What is a pdv and what are its functions?
what can you learn from the sas log when debugging? : Sas programming
Hello Friends, am new to this forum and am not good at sas progarmming. please can any one of you send me couple of sample large sample SAS Jobs which can you use 200 MB of data and other sas job upto 25GB of data. am doing a performance testing on our legacy systems and new upgraded system. I would really appreciate if you can do me this favor Thank you Priya
What are the different servers in sas? : sas-grid-administration
Describe crosslist option in tables statement?
Explain by-group processing?
What are the default statistics for means procedure?
what is data governance? : Sas-di
Are you involved in writing the inferential analysis plan? Tables specfications?
How do you add a number to a macro variable? : sas-macro
What is the difference between SAS functions and procedures?
Explain what Proc glm does?
Explain substr function?
How substr function works in sas?