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

what is lifetest

1 Answers   Cognizant,


how to generate means for every subject;

4 Answers   Mind Tree,


what are the validation tools in sas?

3 Answers   TCS,


Explain the use of proc print and proc contents?

0 Answers  


name several ways to achieve efficiency in your program? : Sas programming

0 Answers  


what techniques and/or procs do you use for tables? : Sas programming

0 Answers  


How we can create SAS USER DEFINED CODE?

0 Answers  


What are symbol tables?Differemce between Local N Global Symbol tables.....

2 Answers   TCS,


create macros---you have 365 number of data and you need to merge it throw the macros,,,,,, data file1; input a @@; cards; 1 2 3 4 ; run; data file2; input a @@; cards; 5 6 7 8 ; run; data file3; input a @@; cards; 9 10 11 12 ; run;data file4; input a @@; cards; 13 14 15 16 ; run;

6 Answers   WNS,


How does SAS handle missing values in: assignment statements, functions, a merge, an update, sort order, formats, PROCs?

0 Answers   Quintiles,


Does anybody have SAS Training manual or documentation or can you refer me any book to have better understanding on SAS. I am fresher to SAS tool. (Ready to pay)

4 Answers  


Difference b/n proc means and proc summary procedures?

3 Answers   Accenture,


Categories