-
Notifications
You must be signed in to change notification settings - Fork 9
/
full-outer.sas
36 lines (34 loc) · 868 Bytes
/
full-outer.sas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
data num_english;
length txt $20.;
num=1; txt='one' ; output;
num=2; txt='two' ; output;
num=3; txt='three'; output;
num=5; txt='five' ; output;
run;
data num_german;
length txt $20.;
num=1; txt='eins' ; output;
num=3; txt='drei' ; output;
num=4; txt='vier' ; output;
num=5; txt='fünf' ; output;
run;
proc sql;
select
coalesce(en.num, gr.num) as num,
en.txt as txt_en,
gr.txt as txt_fr
from
num_english en full outer join
num_german gr on en.num = gr.num
/* using(num) -> The using clause is not supported */
;
quit;
/*
num txt_en txt_fr
----------------------------------------------------
1 one eins
2 two
3 three drei
4 vier
5 five fünf
*/