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 diff. b/w proc means and proc summary?
Have you used macros? For what purpose you have used? : sas-macro
how could you generate test data with no input data? : Sas programming
In PROC PRINT, can you print only variables that begin with the letter “A”?
Which date functions advances a date time or date/time value by agiven interval?
How to include or exclude specific variables in a data set?
What is the differnce between SDTM 3.1.2 to 3.1.1 version
DATA ABC; INPUT TDATE DATE9. AVG; CARDS; 18APR2008 150.00 19APR2008 167.00 20APR2008 123.00 21APR2008 145.00 ; RUN HOW CAN I FIND THE DIFFERENCE BETWEEN AVG OF 18APR2008 ANF 21APR2008?? IF ANY ONE GETS IT PLS TRY TO POST IT.
8 Answers Verinon Technology Solutions,
How to test the debugging in sas?
Tell me about % include and % eval? : sas-macro
how can you import .csv file in to sas? : Sas programming
what is pdv? how it is related to input buffer in sas?