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

Difference between sum function and using “+” operator?

0 Answers  


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

0 Answers   L&T, SAS,


I use NOCUM/NOPERCENT option in the tables statement like this Proc freq data = deepak; tables x y /nocum nopercent; run; Here I get nopercent and nocum in the output only for variables x and y. How do i do it for all variables? Deepak

1 Answers  


Differentiate between format and informat? : sas-grid-administration

0 Answers  


What does P-value signify about the statistical data?

0 Answers  






how do i read multiple spaces in datasets? eg: vijaya raghava perumal.I tried with using & but it workss if its vijaya raghava but not for raghava perumal.how to do this?

8 Answers   Wipro, Xansa,


how to assign a macro value to a variable?

8 Answers   CitiGroup,


Mention how to limit decimal places for the variable using proc means?

0 Answers  


In SAS explain which statement does not perform automatic conversions in comparisons?

0 Answers  


what is slowly changing dimension? : Sas-di

0 Answers  


What are the difficulties u faced while doing vital signs table or dataset?

0 Answers  


How to limit decimal places for variable using proc means?

0 Answers  


Categories