Insert dummy data based on data time found in column while doing data collection, I've come to realize that some of the data are missing and could not be re-collected due to some issue with the program. One of the suggestions given was to replace the missing data with dummy data. An example is given below to better explain my issue:



the data is intended to contain data from 00:00hrs till 00:00 the next day. However, due to the shortcomings of the program, the data could not be retrieved. Is there a way too use the time in the data column to insert in dummy data? Using the data in the red box as an example, the dummy data would fill up from timings, 00:00hrs - 05:00 and 14:30 - 00:00 on the 15 of Aug. 

I'm thinking of using CTE to complete the task, however, I'm unsure of how to do it.
WITH RECURSIVE
cte AS ( SELECT MIN(datetimefield) datetimevalue -- or some literal value
         FROM datatable
       UNION ALL
         SELECT datetimevalue + INTERVAL 30 MINUTE
         FROM cte
         WHERE datetimevalue &lt; ( SELECT MAX(datetimefield) -- or some literal value
                                  FROM datatable )
       )
INSERT INTO datatable (datetimefield, valuefield)
SELECT datetimevalue, 'dummy value'
FROM cte
WHERE NOT EXISTS ( SELECT NULL
                   FROM datatable 
                   WHERE cte.datetimevalue = datatable.datetimefield )


Of course you must adjust the syntax to your DBMS dialect.