Why these code giving different result?
Data B;
Input ID Name$ Weight;
cards;
2 A 2
4 B 3
5 Cc 4
7 Dd 5
;
run;
Data A;
Input ID Name$ Height;
cards;
1 A 1
3 B 2
5 C 2
7 D 2
9 E 2
;
run;
PROC SQL;
Create table dummy as
Select * from A as x inner join B as y
On x.ID = y.ID;
Quit;
output:
ID Name Height Weight
Data dummy;
Merge A (IN = X) B (IN=Y);
by ID;
If X and Y;
run;
Output:
1 5 C 2 4 2 7 D 2 5
ID Name Height Weight 1 5 Cc 2 4 2 7 Dd 2 5
... View more