How would you delete duplicate observations?
Answers were Sorted based on User's Feedback
Answer / mohan reddy
NODUP OR NODUPREC OPTION IN PROC SORT STATEMENT.
EX;
PROC SORT DATA=EMP NODUP;
RUN;
NODUPKEY OPTION WILL ALSO DELETE THE DUPLICATE OBSERVATION
VALUES.BUT IT CAN USE THE BY VARIABLE.
EX
PROC SORT DATA=EMP NODUPKEY;
BY ENO;
RUN;
Is This Answer Correct ? | 14 Yes | 1 No |
Answer / vijay
NODUP: in proc sort will delete duplication observations
NODUPKEY: deletes duplicate observation values of Key
variables
Is This Answer Correct ? | 10 Yes | 0 No |
Answer / ananth
nodupkey option in proc sort statement.
Or use first.byvaribale or last.byvariable in data step.
Is This Answer Correct ? | 12 Yes | 3 No |
Answer / prr
In Proc sort:
NoDupkey: TO delete duplicate observations based on By variable.
NoDuprecs: It looksup complete observation and delete
duplicate observations.
Nodup: it is a sas key word tells to sas, to delete
duplicate observations and keep only first one.
in Data step: First. and Last.
In Proc sql: Distinct Clause.
Process of SQL: 1.Select
2.group by
3.having
4.distinct
5.order by
Is This Answer Correct ? | 6 Yes | 0 No |
Answer / ganesh
When you want elemenate duplicate values from dataset using
nodup option in the procedure sort.
When you want elemenate duplicate keys from specified
variables then use nodupkey option in the procedure sort.
Is This Answer Correct ? | 5 Yes | 1 No |
Answer / reddy
nodup will eliminate the successive duplicate value only.
nodupkey eliminates all the duplicate values in a mentioned
variable.
Is This Answer Correct ? | 3 Yes | 3 No |
Answer / thirumalesh.e.
We can delete using Proc NoDupkey NoDuprecs and
NoDuplicates, then by Dupsort system option, then
if.first . last, Proc sql, create by select * unique ...
OK.
Is This Answer Correct ? | 0 Yes | 2 No |
differnce between 8.2 and 9.1.3
Does anybody has SAS Platform Administration certification dumps. pls send to hariithepalli@gmail.com
How can sas program be validated?
how sas deals with business intelligence? : Sas-bi
what are the new features included in the new version of sas i.e., Sas 9.1.3? : Sas programming
what is the use of proc contents and proc print in sas? : Sas-administrator
How would you identify a macro variable? : sas-macro
How could i automate the code in the scenario:Every month one new data set will be created for that perticular month transaction list.Now i would like to update the data in the source table by appending every month data automatically. jan---set jan; feb---set jan feb; mar---set jan mar;
In a shcool there are 1000 students. After completion of every test in 6 subjects , each subject teacher submit the marks of every student at different times and loaded in the database commonly. How will you seperate the top two subject marks for each each studet using SAS?
How to sort in descending order?
Differentiate between format and informat? : sas-grid-administration
what is operational data and operational system? : Sas-di