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!

Sum of hours exceeding 24 hours

AbbY-OCOct 20 2016 — edited Oct 20 2016

SQL Gurus,

I need to add the 'Time_Taken_Display' field in v$rman_backup_job_details view. I tried to add the time using the sql below, but the problem I am running into is, when the Time_Taken_Display is > 24 hours.

select sum(to_number(to_char(to_date(time_taken_display,'hh24:mi:ss'),'sssss'))) from sys.v$rman_backup_job_details;

Error:

ORA-01850: hour must be between 0 and 23

Sample data:

TIME_TAKEN_DISPLAY

00:50:55

11:25:22
10:10:11
24:25:01

Want output as ->> 46:51:29

Thanks,

aBBy

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 17 2016
Added on Oct 20 2016
6 comments
649 views