SAS Certified Adv Programmer 130 Questions (33)
Which one of the following SAS SORT procedure options eliminates identical consecutive observations?
A. NODUP
B. UNIQUE
C. DISTINCT
D. NODUPKEY
Topics:
SAS Adv Questions |
13 Comments »
A
there is no such thing as NODUP in SQL
D: removing duplicates is the NODUPKEY option of PROC SORT
D: NOdupkey is the correct ans.
NODUP is an alias for NODUPRECS.
This is a tricky question.
NODUP eliminates the duplicates but not with PROC SORT. Coz NODUPKEY eliminates duplicates when using with BY Variable. So as PROC SORT uses by variable the correct answer would be D. NODUPKEY.
@rf.. Yes theres is no NODUP in sql. But in SQL we will use DISTINCT option to eliminate duplicates.
Correct andwer is A. NODUP is an alias for NODUPRECS. It is a SAS option, not SQL. NODUP removes only consecutive observations, question was about this. NODUPKEY is deleting based on a BY variable.
A is the answer. NODUP is an alias for NODUPRECS
A. (NODUP is short from NODUPRECS)
NODUPKEY is the answer
ANS:- A
Please try to understand the difference betwen NODUP and NODUPKEY,i.e.
The NODUP option checks for and eliminates duplicate observations.
The NODUPKEY option checks for and eliminates duplicate observations by variable values.
A is correct. NODUP is a valid option in SAS which is an alias for NODUPRECS. NODUPKEY considers only the duplicate ‘key’ or By variable values for elimination, not the entire observation.
A:The NODUP option causes PROC SORT to compare all variable values for each observation to the previous one written to the output data set. The NODUPKEY option causes PROC SORT to compare all BY values for each observation to those for the previous observation written to the output data set