ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 
Categories >> Software >> Data Warehouse >> SAS
 
 


 

 
 Teradata interview questions  Teradata Interview Questions (183)
 Business Objects interview questions  Business Objects Interview Questions (751)
 Cognos interview questions  Cognos Interview Questions (842)
 Informatica interview questions  Informatica Interview Questions (1622)
 Crystal Enterprise Suite interview questions  Crystal Enterprise Suite Interview Questions (29)
 Actuate interview questions  Actuate Interview Questions (35)
 Ab Initio interview questions  Ab Initio Interview Questions (168)
 Data Stage interview questions  Data Stage Interview Questions (563)
 SAS interview questions  SAS Interview Questions (550)
 Micro Strategy interview questions  Micro Strategy Interview Questions (36)
 ETL interview questions  ETL Interview Questions (195)
 Data Warehouse General interview questions  Data Warehouse General Interview Questions (215)
Question
What is the difference between nodup and nodupkey options?
 Question Submitted By :: SAS
I also faced this Question!!     Answer Posted By  
 
Answer
# 1
The NODUP option checks for and eliminates duplicate
observations.

The NODUPKEY option checks for and eliminates duplicate
observations by variable values.
 
Is This Answer Correct ?    73 Yes 10 No
Asha
 
Answer
# 2
The Nodup: can only remove the duplicate next to each other.
The by variables are very important for remove
the duplicates which all the variables have the same value.

The nodupkey: will remove the duplicated when they have the
same values for the by variables
 
Is This Answer Correct ?    28 Yes 2 No
Stopby
 
 
 
Answer
# 3
Nodup:
It deletes those observations if every variable in the
dataset has the same value

Nodupkey:
It deletes all the observation on sorting variable. It
retains the first variable and deletes all other coming
after that
 
Is This Answer Correct ?    13 Yes 3 No
Tariq Sharjil
 
Answer
# 4
data test1;
input id1 $ id2 $ extra ;
cards;
aa ab 3
aa ab 1
aa ab 2
aa ab 3
;
proc sort nodup data=test1;
by id1 ;
run;
proc print data=test1;
run;
output will be like this:

Obs id1 id2 extra

1 aa ab 3
2 aa ab 1
3 aa ab 2
4 aa ab 3

*nodup" is an alias for "noduprecs" which appears to
mean "no duplicate records" but there is no way sas can
know about these duplicate records unless they, by chance,
land next to each other in sequence It is a big mistake
to think sorting "nodup" will remove duplicate records.
Sometime it will, sometime it won't. The only way you can
be sure of removing duplicate records is to "proc sort
nodupkey" and include enough key variables to be sure you
will lose the duplicates you want to lose. In the case
shown above, then if we knew of the same "extra" values
being duplicates we wanted to remove then this variable
should be included in the list of sort variables and
then "nodupkey" will remove the duplicates as shown below.
;
proc sort nodup data=test1;
by id1 id2 extra;
run;

proc print data=test1;
run;
output will be like this:

Obs id1 id2 extra

1 aa ab 1
2 aa ab 2
3 aa ab 3

so as u can see nodup eliminated all duplicate observations
if you sort them by all variables but nodupkey will show
only the duplicate observation.

proc sort nodupkey data=test1;
by id1 ;
run;
options nocenter;
proc print data=test1;
run;
output will be like this:

Obs id1 id2 extra

1 aa ab 3
 
Is This Answer Correct ?    14 Yes 5 No
Majid
 
Answer
# 5
Nodup : it delete the observartions based on each and every
variable value is same irespective of sorting varibale.

Nodupkey: It delete the observarions based on sorting
variable.
 
Is This Answer Correct ?    9 Yes 4 No
Pavan
 
Answer
# 6
NODUP - removes the duplicates. Here the key to remove the
duplicates is the entire record.

NODUPKEY - removes the duplicates. Here the key is the
variable(s) specified by the BY statement.
 
Is This Answer Correct ?    5 Yes 1 No
Sas D
 
Answer
# 7
The nodup option in the sort procedure eliminates observations that are exactly the same across all variables.

The nodupkey option in the sort procedure eliminates observations that are exactly the same across BY variable.
 
Is This Answer Correct ?    4 Yes 0 No
Susheel
 
Answer
# 8
nodup:
By using the proc sort procedure along with nodup
option ,it checks for and eliminates the duplicate records.

nodupkey:
NODUPKEY eliminates the duplicate observation keys
in the data set.
 
Is This Answer Correct ?    17 Yes 14 No
Chiranjeevi
 
Answer
# 9
NODUPKEY :

It checks similar BY variable values and deletes duplicate
observations in the data set based on BY variable values...

NODUP :

It will be available with latest version, It checks and
deletes duplicate observations in the dataset.....

Any comments plzz...
 
Is This Answer Correct ?    13 Yes 10 No
Chandu
 
Answer
# 10
Nodup: Checks for duplicacy among the variables in a row and
keeps the 1st row of that observaion in the final output and
deletes the rest

Nodupkey: Checks for the duplicacy among the variables
specified in "by" statement and keeps the 1st row of the
observaion and deletes the rest
 
Is This Answer Correct ?    1 Yes 0 No
Shalabh Tyagi
 

 
 
 
Other SAS Interview Questions
 
  Question Asked @ Answers
 
Does SAS ?Translate? (compile) or does it ?Interpret?? Explain.   8
how we can call macros with in data step? Allianz 17
Hi, I need to create a SAS Map of USA using SAS Graphs(Proc Gmap).The data i have dosent contain any co-ordinates of USA cities or counties or states, and the zip codes are diffrent in the data i have from the zip code in the Maps.US dataset in the Maps Library for SAS MAPS. the data i have is a sales report. i have to generate the maps according to the states,cities aligned in the sales data, HELP Appriciated   1
How did you use the round function?give an example(don't say it will round to the nearest intger) eg1:round(84.55,.1) =84.6 eg2:round(92.64,.1)=92.6,How it is happening like this tell me the logic,that is how the round function works when we have deimal values? BoA 2
I need help in merging two different datasets. I am merging by date and I want to propagate observations from one dataset to the corresponding dates. One dataset has a unique date for each day of the month, while the other dataset has same date for different patient visits. For example I want to spread an observation on the 31DEC2008 from one dataset to several observations with the same date on a second dataset for all the patients who visited on that date. I have tried to merge the two and the result is not what I wanted. Instead I get a dataset whereby all the dates have missing values where observations from the first datset should have spread.   1
What do you feel about hardcoding?   1
What is _n_? Accenture 23
What r all the reporting procedures...?   3
What is the difference between Regression and Logistic Regression? Can u explain the Assumptions/Conditions?   3
How to Rename Library?   3
What is the difference between nodup and nodupkey options? iFlex 17
Name and describe three SAS functions that you have used, if any? Accenture 4
 
For more SAS Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com