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 / 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

How would you delete observations with duplicate keys?..

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

How would you delete observations with duplicate keys?..

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

How would you delete observations with duplicate keys?..

Answer / vijay

proc sort nodupkey;by var;run;

Is This Answer Correct ?    2 Yes 1 No

How would you delete observations with duplicate keys?..

Answer / upendra

Data <datasetname>;
Set <datasetname>;
by <var>;
If last.var;
run;

Is This Answer Correct ?    1 Yes 0 No

How would you delete observations with duplicate keys?..

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

Post New Answer

More SAS Interview Questions

How could you generate test data with no input data?

14 Answers   CTS,


Explain proc univariate?

0 Answers  


How you can read the variables that you need?

0 Answers  


what is slowly changing dimension? : Sas-di

0 Answers  


1.How to draw pivot tables in Excel by using SAS and in which version we can use VB script for to draw pivot tables in Excel? Answer with example data. 2.What are the advantages of _NULL_ in Data steps? Can we use _NULL_ in Proc steps also? 3. How to call the macro variable into Data Steps? 4. Can we draw pivot tables in Excel using Proc SQL? Please post answers for the above questions with suitable examples, and how to use VB script for Excel using SAS.

1 Answers  






What do you know about symput and symget?

0 Answers  


what is broad cast agent? : Sas-bi

0 Answers  


what are informats in sas? : Sas-administrator

0 Answers  


what is study design in while working with SAS? what are screening variables in SAS?

0 Answers   MSCR,


In sas admin differentiate between roles and capabilities? : sas-grid-administration

0 Answers  


What are the functions which are used for character handling functions?

0 Answers  


What are the default statistics for means procedure?

0 Answers  


Categories