how do we get duplicate observations in a separate dataset?
Answer Posted / vipin choudhary
Proc sort data = indata;
by name;
run;
Data outdata;
set indata;
by name;
if first.name and last.name then delete;
run;
proc print data = outdata;
run;
or else you can use the dupout option in proc sort
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
What is the use of PROC gplot?
what is hierarchy flattening? : Sas-di
How does SAS handle missing values in: assignment statements, functions, a merge, an update, sort order, formats, PROCs?
Describe the function and untility of the most difficult SAS macro that you have written.
it will become easy if uuu provide website linkssss and list of consultanciessssss
i have a dataset with 100 obs i want to generate title from 20th obs onwards with total observations. that should contain 100 obs.dont use firstobs and dnt split the data. use dataset block or proc report? how can we genarate;
Describe the function and untility of the most difficult SAS macro that you have written.
Do you need to rearrange the order of the data for the report?
what is change analysis in sas di ? : Sas-di
Describe 5 ways to do a “table lookup” in SAS?
What is the differnce between SDTM 3.1.2 to 3.1.1 version
what are some differences between proc summary and proc means? : Sas programming
This entry was posted in General. Bookmark the permalink. Post a comment or leave
What are the statements that are executed only?
data data1; input dt account; format dt date9.; cards; 1745 1230 1756 1120 1788 1130 1767 1240 ; data data2; input startdt enddt total; format startdt date9. enddt date9.; cards; 1657 1834 12300 1557 1758 16800 1789 1789 12300 1788 1345 12383 1899 1899 13250 ; proc sql; create table data3 as select * from data1 as x left join data2 as y on x.dt>=y.startdt and x.dt<=y.enddt; quit; Here, we are getting cartision product. But,I want left join report consisting of this program. It should not get duplicate values. you can modify the program also.