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 |
How you can read the variables that you need?
what are all the default values getting in PROC MEANS...???
where are dashboard components are created and maintained? : Sas-bi
If you need the value of a variable rather than the variable itself what would you use to load the value to a macro variable?
what are the methods that you would employ to fine tune your SQL extract process using SAS/Access or Proc SQL?
How experienced are you with customized reporting and use of Data _Null_ features?
What is a method to debug and test your SAS program?
Mention sas system options to debug sas macros.
What is the different between functions and PROCs that calculate the same simple descriptive statistics?
tell me about use of arrays in sas
How do you debug and test your SAS programs?
State the difference between INFORMAT and FORMAT ?