How to generate timeseries data into table in Oracle PL/SQL between two date using interval 1 minute?
How to generate timeseries data into table in Oracle PL/SQL between two date using interval 1 minute? I am new in this topic. In my setup Oracle 12c Standart Edition database and PL/SQL Developer. I have a table which has the following structure: int id; timestamp time_mon; double price; I need to insert data into a table which generate with some period such as 02.01.2018 00:00 - 02.01.2019 00:00 with an interval of 5 minutes. I cannot cope with this task. Please help me and show the SQL code example. 1 Answer 1 Assuming you mean 02.01.2018 = 2 January, this could be a way: select date '2018-01-02' + interval '5' minute * (level -1) from dual connect by date '2018-01-02' + interval '5' minute * (level -1) <= date '2019-01-02' By clicking "Post Your Answer", you acknowledge that you have read our updated ...