I have 2 tables as follows and need the output to be as the 3rd example below. I have tried using the left outer join, but have not been successful. I am using SQLServer 2008.
Any help would be appreciated.
Table1
colA | colB | colC | colD |
1 | 4 | 7 | a |
2 | 5 | 8 | b |
3 | 6 | 9 | c |
Table2
colA | colB | colC | colE |
1 | 4 | 7 | d |
4 | 5 | 8 | e |
QUERY RESULT
colA | colB | colC | colD | colE |
1 | 4 | 7 | a | d |
2 | 5 | 8 | b | null |
3 | 6 | 9 | c | null |
4 | 5 | 8 | null | e |