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

what is the difference between proc means and proc tabulate?

3 Answers   Cognizant, CTS,


what is the primary variable in your study?

3 Answers   Accenture,


How would you code a macro statement to produce information on the SAS log? This statement can be coded anywhere.

8 Answers  


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

1 Answers   Pfizer,


How to read an input file in sas?

0 Answers  


explain the function of substr in sas? : Sas-administrator

0 Answers  


You need to perform an analysis on a massive dataset by groups, but are unable to sort the data due to memory constraint. How would you accomplish the task?

2 Answers  


Differences between where and if statement?

0 Answers  


How would you code a merge that will write the matches of both to one data set, the non-matches from the left-most data set to a second data set, and the non-matches of the right-most data set to a third data set?

2 Answers  


What are the data types that sas contain?

0 Answers  


How we can create SAS USER DEFINED CODE?

0 Answers  


What are the features of base sas system?

0 Answers  


Categories