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


Please Help Members By Posting Answers For Below Questions

What do you know about symput and symget?

836


What is the difference between reading data from an external file and reading data from an existing data set?

732


How you can read the variables that you need?

749


Do we follow ADAM in analysis dataset development?How? Usually which version? Why is it necessary?

2014


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

2006






how will you locate the sas platform applications? : Sas-bi

672


explain the function of substr in sas? : Sas-administrator

660


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.

1914


what is the effect of the options statement errors=1? : Sas programming

687


If a variable contains only numbers, can it be a character data type?

725


what is PhaseIII, ODS, TLG, Macro and Proc in SAS

4007


why is sas data integration studio important? : Sas-di

672


How to specify variables to be processed by the freq procedure?

716


what is the one statement to set the criteria of data that can be coded in any step? : Sas programming

752


Explain how you can debug and test your SAS program?

657