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
how can you put a "trace" in your program? : Sas programming
How would you include common or reuse to be processed along with your statements?
What is the role of administrative users? : sas-grid-administration
what is function of retain statment
For clinical entire study how many tables will create approx?
how can you create zero observation dataset? : Sas programming
sas implementing companies in pune implementing clinical projects if anyone knows plz send ans immediately
What is interleaving in SAS?
what is the effect of the options statement errors=1? : Sas programming
How does proc sql work?
how the sas basic syntax style described? : Sas-administrator
What do the mod and int function do? : Sas programming
what are _numeric_ and _character_ and what do they do? : Sas programming
What is the difference between the proc sql and data step?
if the Id has more then two transcatiion then show the first observation, IF Id has only two observation then It show both the observation