How would you delete duplicate observations?

Answers were Sorted based on User's Feedback



How would you delete duplicate observations?..

Answer / poornima

we can delete duplicate observations by using nodup or
nodupkey option in the proc sort

Example :-

Proc sort data=datasetname nodup;
run;

Is This Answer Correct ?    33 Yes 12 No

How would you delete duplicate observations?..

Answer / padmasri

In 3 ways we can delete the duplicate records.
1.procedure proc sort
in proc sort there are two ways to delete duplicate
observations:
* nodupkey
*noduprec
2.first. and last.
3.proc sql

these 3 ways we can delet the duplicate records in sas.

Is This Answer Correct ?    16 Yes 0 No

How would you delete duplicate observations?..

Answer / 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

How would you delete duplicate observations?..

Answer / vijay

There are several ways to do this. However the easliest
code-wise is to use PROC SORT. For example:

PROC SORT DATA=mydata NODUPKEY;
BY variable;
RUN;

Is This Answer Correct ?    17 Yes 7 No

How would you delete duplicate observations?..

Answer / saritha

noduprecs

Is This Answer Correct ?    7 Yes 3 No

How would you delete duplicate observations?..

Answer / saritha

noduprecs

Is This Answer Correct ?    7 Yes 3 No

How would you delete duplicate observations?..

Answer / mehul thakkar

There are two ways of deleting the records from the dataset
with the help of PROC SORT.
1. Using NODUP/NODUPRECS
2. Using NODUPKEY

The first option deletes the records only if all the
variables values are repeated in the subsequent records.

The second options deletes the records only if the value of
the BY variables given in the BY clause are repeated in the
subsequent records.

Is This Answer Correct ?    4 Yes 1 No

How would you delete duplicate observations?..

Answer / soniya

use nodupkey, noduprec in sort processure

Is This Answer Correct ?    8 Yes 8 No

How would you delete duplicate observations?..

Answer / raj

using proc sort and by statements

Is This Answer Correct ?    3 Yes 16 No

How would you delete duplicate observations?..

Answer / vijay

by using merge statement

Is This Answer Correct ?    2 Yes 19 No

Post New Answer

More SAS Interview Questions

how can u extract,transform and loading?

2 Answers   CitiGroup,


For what purposes have you used sas macros? : sas-macro

0 Answers  


Do we follow ADAM in analysis dataset development?How? Usually which version? Why is it necessary?

0 Answers  


Differentiate between format and informat? : sas-grid-administration

0 Answers  


Of all your work, where have you been the most successful?

0 Answers   Oracle, Six Sigma,






What are the different versions of sas that you have used until now? : sas-grid-administration

0 Answers  


If a variable contains only numbers, can it be a character data type?

0 Answers  


Give an example where SAS fails to convert character value to numeric value automatically?

0 Answers  


wat is sas? is a package or programming language?

4 Answers  


Are you involved in writing the inferential analysis plan? Tables specfications?

0 Answers   Wipro,


data task; input id date date9. visit; cards; 101 01jan2015 1 101 02jan2015 2 101 06jan2015 3 102 04jan2015 1 102 07jan2015 2 102 12jan2015 3 103 06jan2015 1 103 13jan2015 2 ; run; write a program to find out missing dates between visits by each subject.

1 Answers  


How do you connect the desktop application to metadata server? : sas-grid-administration

0 Answers  


Categories