I have 2 tables :
Table A:
A | B | C | D
qwe 4 2019 10
qwe 2 2020 5
qwe 5 2019 5
Table B :
A | B
3 2019
4 2019
5 2019
6 2019
7 2019
8 2019
9 2019
10 2019
11 2019
12 2019
1 2020
2 2020
I want the output table to contain all numbers and years from table B in Table A. So, the text qwe should be shown 12 times with respective numbers.
Output Table:
A | B | C | D
qwe 3 2019 0
qwe 4 2019 10
qwe 5 2019 5
qwe 6 2019 0
qwe 7 2019 0
qwe 8 2019 0
qwe 9 2019 0
qwe 10 2019 0
qwe 11 2019 0
qwe 12 2019 0
qwe 1 2020 0
qwe 2 2020 5
Note: Table A contains more values than qwe so i am trying to replicate 12 values for all of the different records. Column D should be showing 0 for records that dont exist.
I have tried a full outer join but a full outer join produces 12 records for each record of qwe in table A.