what is Difference between PROC SQL JOINS and MERGE?
Answer Posted / rajitha macherla
The resultant dataset depends on the input datasets.
In case of one to one and one to many both work
similarly,i.e. the resultant dataset is same.
But differs in case of many to many and non matching
datasets:
many to many:
ex: (merge on x) (proc sql)
X Y X Z X Y Z X Y Z
----- ------ ------- -------
1 A 1 F 1 A F 1 A F
1 C 1 R ---> 1 C R 1 A R
2 B 2 G 2 B G 1 C F
1 C R
2 B G
NON MATCHING DATA:
ex: (merge on x) (proc sql)
X Y X Z X Y Z X Y Z
----- ------ ------- -------
1 A 1 F 1 A F 1 A F
2 B 3 T ---> 2 B . 3 C T
3 C 4 G 3 C T
4 . G
Is This Answer Correct ? | 28 Yes | 6 No |
Post New Answer View All Answers
What is a macro routine?
What is data _null_?
In ARRAY processing, what does the DIM function do?
What is the difference between %local and %global? : sas-macro
What is the difference between proportion and average?
Explain why double trailing @@ is used in input statement?
What are the default statistics that proc means produce?
How will you generate test data with no input data?
How long can a macro variable be? A token? : sas-macro
how would you create multiple observations from a single observation? : Sas programming
Are you involved in writing the inferential analysis plan? Tables specifications?
Can you execute macro within another macro? If so, how would sas know where the current macro ended and the new one began? : sas-macro
Given an unsorted data set, how to read the last observation to a new data set?
What is run-group processing?
What are the differences between sum function and using “+” operator?