How would you delete observations with duplicate keys?

Answers were Sorted based on User's Feedback



How would you delete observations with duplicate keys?..

Answer / nishant

Use nodupkey option in proc sort

Is This Answer Correct ?    6 Yes 1 No

How would you delete observations with duplicate keys?..

Answer / ganesh

use nodupkey in proc sort automatically the duplicate key
going to delete.

Is This Answer Correct ?    2 Yes 0 No

How would you delete observations with duplicate keys?..

Answer / ganesh

we can delete the observation by using NODUP.

proc sort data=name nodup;
by varname;
run;

Is This Answer Correct ?    2 Yes 0 No

How would you delete observations with duplicate keys?..

Answer / haritha

In data step first dot variable and last dot variable use
to delete the duplicate values.
by using no dup we delete the duplicate values in row wise
and no dup key is used to delete the duplicate values in
column wise it means observation
and distinct is use to delete the duplicate values in proc
sql

Is This Answer Correct ?    3 Yes 1 No

How would you delete observations with duplicate keys?..

Answer / chirag patel

using Nodup you can delete duplicate observation

Is This Answer Correct ?    4 Yes 3 No

How would you delete observations with duplicate keys?..

Answer / roopanwita

There is stage called Remove Duplicate to delete duplicate
record and also Sort stage do same funtion.Otherwise if
source databse is a table,then in source SQL we can select
distinct value.

Is This Answer Correct ?    1 Yes 0 No

How would you delete observations with duplicate keys?..

Answer / prakash

nodupkey

Is This Answer Correct ?    1 Yes 0 No

How would you delete observations with duplicate keys?..

Answer / thirumalesh

NoDupKey is to delete duplicate observations based on by variables as a key variable, Noduprecs is to delete multiple observations with same values(repeated values).

also it can be done using proc sql,
and using fist and last statements in if condiotion.

Is This Answer Correct ?    1 Yes 0 No

How would you delete observations with duplicate keys?..

Answer / satish

using nodupkey

Is This Answer Correct ?    2 Yes 2 No

How would you delete observations with duplicate keys?..

Answer / tangyoulei

or distinct in proc sql

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More SAS Interview Questions

explain what is data set in sas? : Sas-administrator

0 Answers  


Explain the use of proc print and proc contents?

0 Answers  


How to get second top scorer student from a class- table having different sections A, B, C & D? each section has same number of student.

4 Answers   TCS,


For clinical entire study how many tables will create approx?

0 Answers   TCS,


how many display types available in sas bi dashboard? : Sas-bi

0 Answers  


what are all the reports you generated in your recent project?

0 Answers   Accenture, Quintiles,


The below code we are using for creating more than one macro variables in proc sql using into clause. How we can use same code to create macro variables vara, varb, varc instead of var1, var2, var3.? proc sql noprint; select count(distinct(patient)) into :var1 - :var3 from dataset1 group by trtreg1c ; quit;

1 Answers   Accenture,


libname deepak 'C:\SAS Files'; proc format; invalue convert 'A+' = 100 'A' = 96 'A-' = 92 'B+' = 88 'B' = 84 'B-' = 80 'C+' = 76 'C' = 72 'F' = 65; data deepak.grades; input ID $3. Grade convert.; *format Grade convert. ; datalines; 001 A- 002 B+ 003 F 004 C+ 005 A ; proc print data = deepak.grades; run; I get the following output Obs ID Grade 1 001 . 2 002 . 3 003 . 4 004 . 5 005 . I don’t understand why Grade shows up as a missing value. Everything seems fine, including ID $3. Now, in case I use ID : $3. Or use column input, I get the desired output. Kindly help Deepak

7 Answers  


how can get the first and last observations in a dataset using Proc SQl?

4 Answers   Satyam,


what is factor analysis? : Sas-administrator

0 Answers  


List out some key concept of SAS

0 Answers  


What are the difference between sas functions and procedures?

0 Answers  


Categories