what is Difference between PROC SQL JOINS and MERGE?

Answers were Sorted based on User's Feedback



what is Difference between PROC SQL JOINS and MERGE?..

Answer / 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

what is Difference between PROC SQL JOINS and MERGE?..

Answer / siddu

Before doing the merge process we have to do sorting depended the key variable, but in proc sql joins no need to do sorting.

Is This Answer Correct ?    6 Yes 0 No

what is Difference between PROC SQL JOINS and MERGE?..

Answer / nrtya vardhanapu

merge is a statement which is used in the data step Whereas
join is a procedure which is used in the proc step. But the
outputs produced are the same !!!!

Is This Answer Correct ?    0 Yes 13 No

Post New Answer

More SAS Interview Questions

If you were told to create many records from one record, show how you would do this using array and with proc transpose?

0 Answers  


which date functions advances a date time or date/time value by a given interval? : Sas programming

0 Answers  


Explain the special input delimiters used in sas programming.

0 Answers  


What is by-group processing?

0 Answers  


what are the different ways of merging two datasets.name atleast 4.

2 Answers  






how can get the first and last observations in a dataset using Proc SQl?

4 Answers   Satyam,


how does sas handle missing values in an update? : Sas programming

1 Answers  


what is the use of proc sql? : Sas programming

0 Answers  


explain the difference between alternate key, business key, foreign key, generated key, primary key, retained key and surrogate key ? : Sas-di

0 Answers  


What is the basic syntax style in SAS?

0 Answers  


Why and when do you use proc sql?

0 Answers  


I have 50 variables in one data set, In reports i want to generate every 10 variables in one page how we will write code in proc report.

4 Answers  


Categories