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 class statement and by statement in proc means?

0 Answers  


What is the difference between reading data from an external file and reading data from an existing data set?

0 Answers  


Hi, If anyone has base SAS certification dumps, please share.

0 Answers  


Tell e how how dealt with..

0 Answers  


what is sas application server, database server, sas olap server and sas metadata server? : Sas-di

0 Answers  






hi guys ...i have one query... data abc; input s w k g o t a m; cards; 1 2 3 4 5 6 7 8 2 3 4 5 6 7 8 9 ; run; i want the output to be the sorted order(only variables).observations should not be changed..

14 Answers  


if i having variables named a b c d e f ,how to find total of each variable ????give syntax...??

6 Answers   Accenture,


In PROC PRINT, can you print only variables that begin with the letter “A”?

8 Answers  


Briefly describe 5 ways to do a "table lookup" in sas.

4 Answers   Quintiles,


if you have 365 no of data set and each one having different variable from each other. how will you read by creating macros and create a single data set.

2 Answers  


i have a null dataset with 20 variables. i want to upload the variables which contain name like a or k or anything in another dataset.how can we create the dataset?

3 Answers   L&T,


The Lion King is hosting an animal conference. All the animals in the world attend except one. Which animal does not attend?

6 Answers   Oracle,


Categories