How would you delete duplicate observations?

Answer Posted / mehul thakkar

There are two ways of deleting the records from the dataset
with the help of PROC SORT.
1. Using NODUP/NODUPRECS
2. Using NODUPKEY

The first option deletes the records only if all the
variables values are repeated in the subsequent records.

The second options deletes the records only if the value of
the BY variables given in the BY clause are repeated in the
subsequent records.

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hello, I have PROC SQLs results group by 3 fields and I use SUM and COUNT functions in SQL. The problem is when I try to display my result with PROC TABULATE. I am getting very big numbers. I believe I make a mistake some where in Tabulate. Here is my Proc Tabulate. PROC TABULATE DATA=OUT04_05 FORMAT=12.; CLASS YR CENTRE VISA / PRELOADFMT EXCLUSIVE; VAR NEWUSER FRAUD TRANSFER AUTUSER REISSUE; TABLE CENTRE ALL, (YR ALL)*VISA, (NEWUSER*F=COMMA12. AUTUSER*F=COMMA12. FRAUD*F=COMMA12. TRANSFER*F=COMMA12. REISSUE*F=COMMA12.) / MISSTEXT={LABEL='0'} PRINTMISS RTS=20; FORMAT VISA VISAFMT.; KEYLABEL SUM = ' ' ALL = 'TOTAL'; LABEL YR = 'DATE YEAR' NEWUSER = 'TOTAL NEW ACCT' TRANSFER = 'TOTAL TRANSFER' FRAUD = 'TOTAL FRAUD TRANSFER' AUTUSER = 'TOTAL AUTH USERS' REISSUE = 'TOTAL REISSUE'; When I code it like : NEWUSER*N*F=COMMA12. AUTUSER*N*F=COMMA12. I get same amount numbers but to find a NEWUSER I use COUNT(*) and to find AUTUSER I use SUM(xxxx) function so both result shouldn’t be the same my problem is in this point. Could you tell me where the problem in code is. How can I display my result? TX.

1875


Explain the purpose of substr functions in sas programming.

671


Describe the function and untility of the most difficult SAS macro that you have written.

1813


What is slibref?

849


For clinical entire study how many tables will create approx?

1615






What are pdv and it functions?

681


WHAT IS SAS WEB SERVICE and what are the steps to create an xml service ?

2391


what is change analysis in sas di ? : Sas-di

686


Assuming {et} is randomly drawn from N(0,1) and e0 = 0, generate 200 observations of xt = et − 0.5e(t−1) and draw a line graph of xt.

1558


Are you involved in writing the inferential analysis plan? Tables specfications?

1844


How do dates work in sas?

738


what are _numeric_ and _character_ and what do they do? : Sas programming

777


How to create a permanent sas data set?

766


How to read an input file in sas?

745


What was the last computer book you purchased? Why?

1997