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 do you generate random samples?

5 Answers  


Explain proc univariate?

0 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?

16 Answers  


what do the sas log messages "numeric values have been converted to character" mean? What are the implications? : Sas programming

0 Answers  


create macros---you have 365 number of data and you need to merge it throw the macros,,,,,, data file1; input a @@; cards; 1 2 3 4 ; run; data file2; input a @@; cards; 5 6 7 8 ; run; data file3; input a @@; cards; 9 10 11 12 ; run;data file4; input a @@; cards; 13 14 15 16 ; run;

6 Answers   WNS,






What are the new features included in the new version of SAS Programming Language?

0 Answers  


How the Excel file enter into the SAS environment without Code of Infile & Import procs,if i have no file Conversion?

3 Answers   Reddy Labs,


Name statements that function at both compile and execution time.

7 Answers   Accenture,


What are the ways to do a “table lookup” in sas?

0 Answers  


Explain substr function?

0 Answers  


What type of tables you are using in YOUR reporting..???

2 Answers   GSK GlaxoSmithKline,


What is the Program Data Vector (PDV) and What are its functions?

9 Answers  






Categories