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

i have a dataset with 100000 records. i want 100 records from that dataset and create a dataset.we need to pick the observations random order like 100obs,500obs,1020obs,1890obs,2565obs like that i need 100 obs in random order? how can we create this one?

5 Answers   L&T,


please can you tell me that in companies sas work are doing by through sas coding or sas wizard ??

0 Answers  


How many versions came upto now in SAS?

3 Answers   TCS, CTS,


How do handle working under pressure?

1 Answers   Wipro, Oracle,


What do you feel about hardcoding?

4 Answers   Oracle,






SAS System ?

5 Answers  


what is information maps?

0 Answers   CitiGroup,


What is the difference between SAS Data step and SAS PROC SQL, and which is better?

1 Answers   TCS,


What are some problems you might encounter in processing missing values? In Data steps? Arithmetic? Comparisons? Functions? Classifying data?

1 Answers   Quintiles,


Which are the statements whose placement in the data step is critical?

0 Answers  


What is _n_?

22 Answers  


What are all the problems you faced while validating tables and reports?

0 Answers   Accenture, Quintiles,






Categories