UNION two datasets together instead of JOIN?

Hi,

this is a good question. I wanted to use this in the past, too.

Do you have many columns in your datasets?

You could make a FULL JOIN on a column, where nothing matches, so you get every row from both tables.

col1| col2| col3| col4| col5|col6
x | x | x | | |
| | | y | y | y

after this you could use COALESCE on every column to move them together.
COALESCE(col1,col4) | COALESCE(col2,col5) | COALESCE(col3,col6)
x | x | x
y | y | y

This is not an optimal solution, but could work.

2 Likes