I have 2 tables.
Table A
Id | version | name | contact |
---|---|---|---|
1 | 1 | abc | 123 |
1 | 2 | abc | 456 |
1 | 3 | abc | 678 |
1 | 4 | abc | 456 |
1 | 5 | abc | 678 |
Table B
Id | version | Job | City |
---|---|---|---|
1 | 1 | XYZ | CA |
1 | 3 | XYZ | MB |
1 | 5 | XYZ | LM |
I want to join both tables on ID and version and update table B for missing ID/Version with previous values
Table B
Id | version | Job | City |
---|---|---|---|
1 | 1 | XYZ | CA |
1 | 2 | XYZ | CA |
1 | 3 | XYZ | MB |
1 | 4 | XYZ | MB |
1 | 5 | XYZ | LM |