Rafael Brauns
2023-02-13 08:50:07 UTC
Hi,
can anyone help-me with this select?
I want to display the minutes and hours, because sometimes the process takes over 1 hour to complete.
select ACTIVITY, to_char(START_TIME, 'DD.MM.YYYY-HH24:MI:SS'), to_char(END_TIME, 'DD.MM.YYYY-HH24:MI:SS'), CAST(FLOAT(BYTES)/1024/1024/1024 as DEC(8,0)), SUCCESSFUL, TIMESTAMPDIFF(4, CHAR(endt_time-start_time)) as TOTAL_RUN_TIME from ACTIVITY_SUMMARY where start_time>=(current_timestamp-7 days) and activity='FULL_DBBACKUP' order by start_time DESC
ACTIVITY: FULL_DBBACKUP
Unnamed[2]: 06.02.2023-15:00:26
Unnamed[3]: 06.02.2023-15:17:55
Unnamed[4]: 77
SUCCESSFUL: YES
TOTAL_RUN_TIME: 17
and it would be nice something like this
ACTIVITY: FULL_DBBACKUP
Unnamed[2]: 06.02.2023-15:00:26
Unnamed[3]: 06.02.2023-15:17:55
Unnamed[4]: 77
SUCCESSFUL: YES
TOTAL_RUN_TIME: 00:17
can anyone help-me with this select?
I want to display the minutes and hours, because sometimes the process takes over 1 hour to complete.
select ACTIVITY, to_char(START_TIME, 'DD.MM.YYYY-HH24:MI:SS'), to_char(END_TIME, 'DD.MM.YYYY-HH24:MI:SS'), CAST(FLOAT(BYTES)/1024/1024/1024 as DEC(8,0)), SUCCESSFUL, TIMESTAMPDIFF(4, CHAR(endt_time-start_time)) as TOTAL_RUN_TIME from ACTIVITY_SUMMARY where start_time>=(current_timestamp-7 days) and activity='FULL_DBBACKUP' order by start_time DESC
ACTIVITY: FULL_DBBACKUP
Unnamed[2]: 06.02.2023-15:00:26
Unnamed[3]: 06.02.2023-15:17:55
Unnamed[4]: 77
SUCCESSFUL: YES
TOTAL_RUN_TIME: 17
and it would be nice something like this
ACTIVITY: FULL_DBBACKUP
Unnamed[2]: 06.02.2023-15:00:26
Unnamed[3]: 06.02.2023-15:17:55
Unnamed[4]: 77
SUCCESSFUL: YES
TOTAL_RUN_TIME: 00:17