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 do you know about symput and symget?
What is the difference between reading data from an external file and reading data from an existing data set?
How you can read the variables that you need?
Do we follow ADAM in analysis dataset development?How? Usually which version? Why is it necessary?
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
how will you locate the sas platform applications? : Sas-bi
explain the function of substr in sas? : Sas-administrator
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.
what is the effect of the options statement errors=1? : Sas programming
If a variable contains only numbers, can it be a character data type?
what is PhaseIII, ODS, TLG, Macro and Proc in SAS
why is sas data integration studio important? : Sas-di
How to specify variables to be processed by the freq procedure?
what is the one statement to set the criteria of data that can be coded in any step? : Sas programming
Explain how you can debug and test your SAS program?