How would you delete duplicate observations?

Answers were Sorted based on User's Feedback



How would you delete duplicate observations?..

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

How would you delete duplicate observations?..

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

How would you delete duplicate observations?..

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

How would you delete duplicate observations?..

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

How would you delete duplicate observations?..

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

How would you delete duplicate observations?..

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

How would you delete duplicate observations?..

Answer / raj

nodupkey

Is This Answer Correct ?    2 Yes 4 No

How would you delete duplicate observations?..

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

How would you delete duplicate observations?..

Answer / guest

nodup option in the merge statement

Is This Answer Correct ?    4 Yes 15 No

Post New Answer

More SAS Interview Questions

in ods is there any lib's

2 Answers   SAS,


Explain substr function?

0 Answers  


What statement do you code to tell SAS that it is to write to an external file?

5 Answers  


how do you validate tables abd reports?

2 Answers   Accenture, Quintiles,


HOW DO WE CREATE A SAS STORED PROCESS IN SAS EG ?

1 Answers   TCS,


Explain the purpose of substr functions in sas programming.

0 Answers  


For a user to have access to a standard workspace server, is internal authentication alone is sufficient? : sas-grid-administration

0 Answers  


how to write code for left outer join in SAs using datastep?

8 Answers   CitiGroup,


Which statement does not perform automatic conversions in comparisons?

0 Answers  


What is proc sort?

0 Answers  


How does proc sql work?

0 Answers  


How do you debug and test your SAS programs? What can you learn from the SAS log when debugging? How do you test for missing values? How would you create multiple observations from a single observation? What are some good SAS programming practices for processing very large data sets? Briefly describe 5 ways to do a "table lookup" in SAS. Why is SAS considered self-documenting? Are you sensitive to code walk-throughs, peer review, or QC review? What other SAS features do you use for error trapping and data validation? How does SAS handle missing values in: assignment statements, functions, a merge, an update, sort order, formats, PROCs?

2 Answers  


Categories