what is Difference between PROC SQL JOINS and MERGE?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
1.we can execute a macro with in a macro,by using call symput and symget can any one give me one example? 2.We can create the macro variables by using %let,%do,macro parameters,INTO clause in proc sql and call symput, can any one give me example to create macro variable with INTO clause and call symput? 3.
How we can call macros with in data step? : sas-macro
What is LAG function?How is it used? can any one explain
3 Answers TRE, Verinon Technology Solutions,
Have you been involved in editing the data or writing data queries?
1 Answers BioServe, Oracle, Sasken,
Explain proc univariate?
what is syntax of proc merge ?
How to write duplicate records into a separate dataset using sort?
name few built in sas transformation in DI studio ?
Compare sas with other data analytics tools.
what is the difference between %put and symbolgen?
data task; input id date date9. visit; cards; 101 01jan2015 1 101 02jan2015 2 101 06jan2015 3 102 04jan2015 1 102 07jan2015 2 102 12jan2015 3 103 06jan2015 1 103 13jan2015 2 ; run; write a program to find out missing dates between visits by each subject.
how to intersect the tables by using PROC MIXED?