Z
Z
zhaar2019-05-28 15:42:18
OLAP
zhaar, 2019-05-28 15:42:18

How to fill empty rows with non-existent values?

There is a table that contains several hundred thousand records of quantity changes (the fact of the change = the date of the entry in the table). The third field is the change to the date
5ced2ab9d9e61727953688.png
. How can I fill in the data for all the numbers, using the data from the date for which they are? To get it like this:
5ced2c39b947b753843629.png
SQL2014/2016 is used
UPD: I thought that such a thing can be implemented within the framework of OLAP analytics, where the cube itself will complete the virtual dates. But how to transfer at least the existing data there and force the cube to build aggregates?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
d-stream, 2019-05-28
@d-stream

stupidly, but simply: we fill the table with all the necessary dates (a kind of grid) and with it the original one through full outer join

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question