How would you delete observations with duplicate keys?
Answers were Sorted based on User's Feedback
Answer / mohan reddy
proc sort data=work.abc nodupkey;
by eno;
run;
when u have delete duplicatie obervation from dataset. u can
use the nodupkey along with the by variable.
Is This Answer Correct ? | 10 Yes | 0 No |
Answer / g.jyotshna
proc sort data=datasetname nodup;
by var;
run;
proc sort data=datasetname nodupkey;
by var;
run;
proc sort data=datasetname noduprecs;
by var;
run;
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / rohit
You can also use a Proc SQL statement with a Distinct
keyword.
Proc Sql;
Select Distinct tablename.* from tablename;
Quit;
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / upendra
Data <datasetname>;
Set <datasetname>;
by <var>;
If last.var;
run;
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / siddu
proc sort data=<master dataset> out=(newdata set name>
nodup key;
by <key variable>;
run;
Is This Answer Correct ? | 0 Yes | 1 No |
What is the difference between the proc sql and data step?
Differentiate between ceil and floor functions.
Why and when do you use proc sql?
How to limit decimal places for the variable using proc means?
Suppose there is a SAS dataset with following values - Parent Child A B B C D E F G G H H I and so on….. This goes onto 1000s of observations/rows. Now how do we identify from this dataset Grandparents and Grandchildrens ?
5 Answers American Express, Barclays,
What is criteria for adverse events and treatment-emergent adverse events?
what is incremental update ? is this possible in SAS OLAP CUBE STUDIO.
1.How many ways are there to create variables? 2.What is CLM,how can we use it? 3.what are the advontages of data step? 4.what is the extension of editor window in SAS 9.1.3? 5.How do you copy a particular data set from one library to another? 6.what is the use of double option? 7.Advontages of Proc Report? 8.what is the basic use of where statement? 9.How do you terminate the statments in SAS Programming? 10.What is the difference between symput and symget? 11.How would a identify the local and global variable? can any one answer for the 4'th question
Hi , which book should i refer to for preaparing SAS statistical Exam. Searched a lot on books but still did n't find relevant books
Can we create datasets by proc step ? (Proc contents, Means)?
What is the Program Data Vector (PDV)? What are its functions?
what are some differences between proc summary and proc means? : Sas programming