How would you delete observations with duplicate keys?
Answers were Sorted based on User's Feedback
Answer / ganesh
use nodupkey in proc sort automatically the duplicate key
going to delete.
Is This Answer Correct ? | 2 Yes | 0 No |
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 |
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 |
Answer / chirag patel
using Nodup you can delete duplicate observation
Is This Answer Correct ? | 4 Yes | 3 No |
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 |
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 |
explain what is data set in sas? : Sas-administrator
Explain the use of proc print and proc contents?
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.
For clinical entire study how many tables will create approx?
how many display types available in sas bi dashboard? : Sas-bi
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;
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
how can get the first and last observations in a dataset using Proc SQl?
what is factor analysis? : Sas-administrator
List out some key concept of SAS
What are the difference between sas functions and procedures?