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

What is run-group processing?

610


Enlist the functions performed by sas.

659


What are the table names in oracle database...?

2234


Name some categories in sas 9? : sas-grid-administration

544


Differentiate between sas functions and sas procedures.

626






what are the softwares and applications that are used most frequently used by sas bi applications developers? : Sas-bi

541


what is sas business intelligence? : Sas-bi

572


What are the statements that are executed only?

659


If you could design your ideal job, what would it look like?

2353


What is the role of sas grid administrator? : sas-grid-administration

809


What are the different versions of sas that you have used until now? : sas-grid-administration

710


what are some problems you might encounter in processing missing values? In data steps? Arithmetic? Comparisons? Functions? Classifying data? : Sas programming

711


Differentiate between ceil and floor functions.

644


what does the run statement do? : Sas programming

542


what is information maps?

1591