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

How would you invoke a macro? : sas-macro

0 Answers  


what are different analysis datasets you created and what are the new variables created

2 Answers   Sciformix,


What is Tabulate.?Why we use it.? Which type of output we get from Tabulate.?

3 Answers   TCS,


What do you feel about hardcoding?

1 Answers  


what is transformation in sas data integration? : Sas-di

0 Answers  






how to assign a macro value to a variable?

8 Answers   CitiGroup,


whenever we using the merging through data set merging ,we can get note in log like this "MERGE STATEMENT HAS MORE THAN ONE ONE DATASET BY REPEATED BY VAIABLES" but the output has come in good manner,whenever in in sql(full join) we can get cartion product.so How do overcome this problem in sql?

1 Answers   Accenture,


What can you learn from the SAS log when debugging?

0 Answers   Quintiles,


What is the use of PROC gplot?

0 Answers  


is it possible to generate sas datasets using proc print ???

1 Answers   GSK GlaxoSmithKline,


How would you include common or reuse code to be processed along with your statements?

5 Answers   PSCI,


To what type of programms have you used scratch macros?

0 Answers   Novartis,


Categories