I know that in the long run... the column names being the same is probably irrelevant. But here's what I've got:
Master Table:
| PersonID | 1970 | 1971 | 1972 | 1973 |
|----------|------|------|------|------|
| 1 | 50 | 50 | 100 | 50 |
| 2 | 30 | 30 | 40 | 40 |
| 3 | 40 | 40 | 40 | 20 |
Supplemental Table
| PersonID | 1972 | 1973 |
|----------|--------|--------|
| 1 | 100 | (null) |
| 2 | (null) | (null) |
| 3 | (null) | 200 |
I'd like to have a table (a view, actually) that will join these two tables, and add the sum of the columns into a column with the same name
Combined Table:
| PersonID | 1970 | 1971 | 1972 | 1973 |
|----------|------|------|------|------|
| 1 | 50 | 50 | 200 | 50 |
| 2 | 30 | 30 | 40 | 40 |
| 3 | 40 | 40 | 40 | 220 |
The resulting table needs to have both tables combined.. The years go all the way to 2017, and are the same name for each table.