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

what is Difference between PROC SQL JOINS and MERGE?

3 Answers   Accenture, Wipro,


1.What is the difference between _NULL_ , _ALL_, and _N_? 2.What are the uses of _NULL_ using in Data Steps? Can we _NULL_ in Proc Steps also? 3.How do call the macro variable in Data Steps? 4.How to construct Pivot tables in Excel Using SAS?

3 Answers  


how to remove duplicates using proc sql?

0 Answers  


What are Dashboard reports?And significance of these in analysis?

1 Answers  


How to get second top scorer student from a class- table having different sections A, B, C & D? each section has same number of student.

4 Answers   TCS,


data study; input Subj : $3. Group : $1. Dose : $4. Weight : $8. Subgroup; x= input(Weight,5.1); datalines; 001 A Low 220 2 002 A High 90 1 003 B Low 193.6 1 004 B High 165 2 005 A Low 123.4 1 ; Why does X get truncated? X shows up as 22 instead of 220,9 instead of 90 and 19.8 instead of 198? This problem doesnt happen with the values 193.6 and 123.4. This does not happen if x is read on the 5. informat instead of the 5.1 informat

2 Answers  


what is the frontend and backend of sas? Is sas is a progaming langauge or tool? on which langauge sas depends?

3 Answers  


What would be the value of month at the end of data step execution and how many observations would be there?

0 Answers  


how does sas handle missing values in a merge? : Sas programming

0 Answers  


Name any two sas spawners? : sas-grid-administration

0 Answers  


if a variable contain dates like "2015/01"---"2015/12" (yymm) ,How to add day to those dates,if them month is jan then 31 if the month is feb then 28 so on ...

0 Answers   Accenture,


Under what circumstances would you code a SELECT construct instead of IF statements?

7 Answers   Accenture,


Categories