Skip to content
Advertisement

Merge two tables in one SQL query and make the date values unique

I have the following two tables which you can also find in the SQL fiddle here:

I use the VBA from here to merge the two tables:

All this works perfectly.


However, now I want that the dates are displayed unique.
The result should look like this:

What do I need to change in my code to make it work?

Advertisement

Answer

Use union all and group by:

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement