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 can you learn from the sas log when debugging? : Sas programming
what is scheduling and how will u implement it. In scheduling 5 jobs r running if there is an error occured at 3rd job and how will u check and waht necessary steps will u take not to repeat the same mistake
I have 50 variables in one data set, In reports i want to generate every 10 variables in one page how we will write code in proc report.
Is it possible to do sorting tranformation in charecter variable??if can tell me one eg..
What do you understand by the term Normal Distribution?
There is a field containing a date. It needs to be displayed in the format "ddmonyy" if it's before 1975, "dd mon ccyy" if it's after 1985, and as 'Disco Years' if it's between 1975 and 1985. How would you accomplish this in data step code? Using only PROC FORMAT
what are several options for creating reports in web report studio? : Sas-bi
how to change the execute of macro
Could you please answers for this. 1.Code the tables statement for a single-level (most common) frequency. 2.Code the tables statement to produce a multi-level frequency.
How do you download a flat file from Mainframe to your local PC using SAS?
my problem is to export my report to xsl.i can do that.but the problem is my report has 3 headings first heading should be printed with the merging of (1-5)cells and heading 2 should be of merge(2-4)cells?how to do this condition?
How do I CREATE an external dataset with sas code? I would like to create within a sascode a non-exsistent textfile on the host. So I am not forced to create the file befor filling it.