Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

I need to create a table that has every 15 minute increment between the current date and a past date

2727722Aug 6 2014 — edited Aug 6 2014

I can round the current datetime to the the last quarter hour, and show every date for the last year, but I am looking for every 15 minutes for each day from '1-Oct-13' to the current date.

Here is what I have so far:

SELECT

trunc(sysdate, 'mi') -

numtodsinterval(mod(to_char(sysdate,'mi'),15),'minute') as Quarter_Hr,

(sysdate-365   (LEVEL -1)) AS DATES

FROM DUAL connect by level <=( sysdate-(sysdate-365))

Any help would be appreciated. I am using this as a dimension table to evaluate performance on a quarter hour basis.

This post has been answered by Solomon Yakobson on Aug 6 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 3 2014
Added on Aug 6 2014
1 comment
1,420 views