# Combine datasets with partially different columns row-wise

I have a problem, which I assume to be trivial, but can't solve it:

I have two datasets,

ds = Dataset@* Map[AssociationThread[{"ID", "Date", "A"} -> #] &]@{ {"C9", SQLDateTime[{2012, 12, 11, 0, 0, 0.}], 10}, {"C9", SQLDateTime[{2015, 2, 19, 19, 30, 0.}], 9}, {"C9", SQLDateTime[{2013, 1, 22, 0, 0, 0.}], 12}, {"C10", SQLDateTime[{2013, 1, 28, 9, 25, 0.}], 15}, {"C10", SQLDateTime[{2014, 3, 21, 20, 0, 0.}], 12}, {"C11", SQLDateTime[{2013, 8, 27, 6, 40, 0.}], 8}}

and

ds2 = Dataset@* Map[AssociationThread[{"ID", "Date", "B"} -> #] &]@{ {"C09", SQLDateTime[{2012, 12, 15, 1, 0, 0.}], 221}, {"C09", SQLDateTime[{2014, 1, 20, 0, 30, 0.}], 112}, {"C10", SQLDateTime[{2013, 1, 28, 0, 25, 0.}], 315}, {"C11", SQLDateTime[{2014, 3, 2, 6, 40, 0.}], 128}}

which I want to combine to one, which looks like that in the end:

So the rows are only written below each other and in the columns, where no value is available a placeholder is used.

The problem is, I don't know how to obtain, this result. Is it any specific use of JoinAcross or do I have to take the Join function or even something else?

Every hint is welcome.

SortBy["ID"]@JoinAcross[ds,ds2, {"ID", "Date"}, "Outer"]

• @Lea, please see JoinAcross >> Details and Options for details of how the four-argument form (JoinAcross[alist, blist, spec, "jspec"]) works: – kglr Nov 15 '17 at 17:49