Let's say I've got the following table:
ProdID Date Val1 Val2 Val3
Prod1 4/1/2019 1 3 4
Prod1 4/3/2019 2 3 54
Prod1 4/4/2019 3 4 54
Prod2 4/1/2019 1 3 3
Prod2 4/2/2019 1 3 4
Prod2 4/3/2019 2 4 4
Prod2 4/4/2019 2 5 3
Prod2
entries are populated correctly as we've got the data from 4/1/2019
to 4/4/2019
.
Prod1
has 1 missing date - 4/2/2019
.
I would like to find missing dates for all ProdIDs and fill in Val1-3 with data copied from the last of previous entry. For instance, I would like to copy data from 4/1/2019
to 4/2/2019
ProdID Date Val1 Val2 Val3
Prod1 4/1/2019 1 3 4
Prod1 4/2/2019 1 3 4
Prod1 4/3/2019 2 3 54
Prod1 4/4/2019 3 4 54
Prod2 4/1/2019 1 3 3
Prod2 4/2/2019 1 3 4
Prod2 4/3/2019 2 4 4
Prod2 4/4/2019 2 5 3