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

code the tables statement for a single level frequency?

2 Answers  


Are you familiar with special input delimiters? How are they used?

4 Answers   Accenture,


Hi, I need to create a SAS Map of USA using SAS Graphs(Proc Gmap).The data i have dosent contain any co-ordinates of USA cities or counties or states, and the zip codes are diffrent in the data i have from the zip code in the Maps.US dataset in the Maps Library for SAS MAPS. the data i have is a sales report. i have to generate the maps according to the states,cities aligned in the sales data, HELP Appriciated

1 Answers  


If you have a data set that contains 100 variables, but you need only five of those, what is the code to force SAS to use only those variable?

10 Answers   Accenture,


explain the concepts and capabilities of business object? : Sas-bi

0 Answers  






How would you combine 3 or more tables with different structures?

7 Answers  


what are the sites did u refer for enquiries and doubts for SAS

2 Answers   UBS,


data voter; input Age Party : $1. (Ques1-Ques4)($1. + 1); datalines; 23 D 1 1 2 2 45 R 5 5 4 1 67 D 2 4 3 3 39 R 4 4 4 4 19 D 2 1 2 1 75 D 3 3 2 3 57 R 4 3 4 4 ; Idont understand what the (Ques1-Ques4)($1. + 1) means. I have seen (Ques1-Ques4)(4*$1.), but what is (Ques1-Ques4)($1. + 1)? Appreciate all help Thanks

3 Answers  


How could you generate test data with no input data?

14 Answers   CTS,


do you need to know if there are any missing values? : Sas programming

0 Answers  


What are the functions which are used for character handling functions?

0 Answers  


What is SAS Information Map Studio and its purpose ?

2 Answers   SAS, TCS,


Categories