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

why is sas data integration studio important? : Sas-di

0 Answers  


what is the need of INDEX in datasets?

6 Answers   CitiGroup,


what is _error_?

2 Answers   Axis Bank, Cognizant, JPMorgan Chase,


What is instream data in SAS?

1 Answers  


hi here is a problem can anybody solve this? i want to report the data through third party file. by using data _null_ or proc report or macro automation process. but i want to insert the 'titles and footnotes' in between the data and also starting of 2nd and ending of 2nd and starting of 3rd and ending of the 3rd page. tell me how and write the code?

0 Answers   Cognizant,






What is the Program Data Vector (PDV)? What are its functions?

5 Answers   Accenture,


I am having a stored process.it needs to route my report to both hthml and Xls.By default SP routes to html.I used the PRINTTO to route the html to Xls.BUt it createsthe file not but no content was written to file(0KB)?how can i do it?

1 Answers  


Hi Friends, My name is Priya,am new to this Forum. am looking for SAS Platform Administration Interview Questions.I searched every where but I couldn't find any where.please can anyone help me with the FAQ's. It would be a great favor to me if you can email the Interview Questions to priyafeb84@gmail.com

0 Answers  


How the date 04oct1994 is stored in SAS,not only give the answer explain in brief?

5 Answers  


If you have a data set that contains 100 variables, but you need only five of those, what is the code to force SAS to use only those variable?

16 Answers  


what is snowflake schema? : Sas-di

0 Answers  


What is the use of stop statement?

0 Answers  


Categories