In some of the hours I insert data to DB with timestamp. I want to have hourly view with rows without records filled with last record data :
Table
DateTime Value 12 4 15 6
Desired Result
DateTime Value 12 4 13 4 14 4 15 6 16 6
It should be possible, but I can’t think about any effective way..
How can this be done?
OK having misread the question once and provided an answer that leaves the gaps efficiently; in order to get the last value out in sql you will need to loop the data which is less efficient.
This returns