I’m a little lot rusty with my SQL and this is driving me nuts. What in my head is a simple outer join for some reason isn’t working.
t1:
column1, column2
101, 1
101, 2
101, 3
102, 2
t2:
column1, column2
1, one
2, two
3, three
4, four
(Where t1.column2 -> t2.column1)
Given the tables above the dataset I’m looking for would be:
101, one
101, two
101, three
101, null
102, null
102, two
102, null
102, null
Maybe I’m over thinking it, I don’t know. I’m trying to get back 4 rows for any select, in this example where t1.column1=101 or t1.column1=102 etc.
A variation on the above (suggested by ypercube in the comments):