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
i have a dataset with 100 obs i want to generate title from 20th obs onwards with total observations. that should contain 100 obs.dont use firstobs and dnt split the data. use dataset block or proc report? how can we genarate;
What are all the problems you faced while validating tables and reports?
Describe the ways in which you can create a macro variable?
Explain how merging helps to combine data sets.
What are the automatic variables for macro? : sas-macro
what is hash files in sas and why we are using this one in sas?
What do you know about sas data set?
What is the difference between the proc sql and data step?
how would you determine the number of missing or nonmissing values in computations? : Sas programming
What are the prime responsibilities of data integration administrator? : Sas-di
how to read the variables in sas? : Sas-administrator
What can you learn from the SAS log when debugging?
in the flow of data step processing, what is the first action in a typical data step? : Sas programming
I have a dataset concat having a variable a b & c. How to rename a b to e & f?
what is sas database server? : Sas-di