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
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.
Explain the purpose of substr functions in sas programming.
Describe the function and untility of the most difficult SAS macro that you have written.
What is slibref?
For clinical entire study how many tables will create approx?
What are pdv and it functions?
WHAT IS SAS WEB SERVICE and what are the steps to create an xml service ?
what is change analysis in sas di ? : Sas-di
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.
Are you involved in writing the inferential analysis plan? Tables specfications?
How do dates work in sas?
what are _numeric_ and _character_ and what do they do? : Sas programming
How to create a permanent sas data set?
How to read an input file in sas?
What was the last computer book you purchased? Why?