How to write duplicate records into a separate dataset using
sort?

Answers were Sorted based on User's Feedback



How to write duplicate records into a separate dataset using sort?..

Answer / guest

Dupout option

Is This Answer Correct ?    27 Yes 1 No

How to write duplicate records into a separate dataset using sort?..

Answer / vimal

PROC SORT DATA=data_a DUPOUT=dup_data
NODUPKEY
OUT=nodup_data;
BY x;
RUN;

Is This Answer Correct ?    4 Yes 0 No

How to write duplicate records into a separate dataset using sort?..

Answer / yam

First sort the data set by the key variable and then

data dup;
set indata1;
if not(first.keyvar) then output dup;
run;

Is This Answer Correct ?    4 Yes 2 No

How to write duplicate records into a separate dataset using sort?..

Answer / charan araveti

if u dont want to use DUPOUT,hear is some code:

data dup(drpo temp_id);
set ds1;
retain temp_id;
if temp_id ne id then
output;
temp_id=id;

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More SAS Interview Questions

What is the difference between proportion and average?

0 Answers   KPMG,


What do you code to create a macro? : sas-macro

0 Answers  


What is SAS informats?

0 Answers  


What is your favorite all time computer book? Why?

0 Answers   Oracle,


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.

0 Answers  






what is fact table and factless table?

1 Answers  


What is the difference between Regression and Logistic Regression? Can u explain the Assumptions/Conditions?

3 Answers  


What are the statements that are executed only?

0 Answers  


Differences between where and if statement?

0 Answers  


How would you code a merge that will keep only the observations that have matches from both sets?

5 Answers  


What are the uses of sas?

0 Answers  


How would you remove a format that has been permanently associated with a variable? ________________

5 Answers   Quintiles, TCS,


Categories