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!

Next Date Calculation

MouleeswarOct 8 2018 — edited Nov 5 2018

Hello All,

Need your help in achieving the following functionality.

1) Create a function or a SQL query to find the next date based on the following input parameters.

        InFreq:    MINUTE, HOUR, DAY, MONTH

        InInterval: 1-99 (minutes)

Ex: If Freq is HOUR and Interval is 2, then the sql should retrieve the value of current date+ 2 hours

2) Attempted to use the DBMS_Scheduler to derive the next date, but the inputs will be received from the application and dropping and re-creating the dbms_jobs would be a cumbersome, is there any alternate way to get this work.

We are using the database version: 12.0.1

Appreciate all your ideas in regards to this.

Thanks

Comments
Post Details
Added on Oct 8 2018
14 comments
1,142 views