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


Please Help Members By Posting Answers For Below Questions

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;

1975


What are all the problems you faced while validating tables and reports?

3016


Describe the ways in which you can create a macro variable?

628


Explain how merging helps to combine data sets.

618


What are the automatic variables for macro? : sas-macro

678






what is hash files in sas and why we are using this one in sas?

1734


What do you know about sas data set?

597


What is the difference between the proc sql and data step?

665


how would you determine the number of missing or nonmissing values in computations? : Sas programming

659


What are the prime responsibilities of data integration administrator? : Sas-di

591


how to read the variables in sas? : Sas-administrator

554


What can you learn from the SAS log when debugging?

921


in the flow of data step processing, what is the first action in a typical data step? : Sas programming

655


I have a dataset concat having a variable a b & c. How to rename a b to e & f?

762


what is sas database server? : Sas-di

619