Our Oracle database upgraded from 10g to 12c recently which resulted in a lot of changes to reporting. The below logic used to return data in a 16:25:10
format:
to_char( numtodsinterval(
(select max(date_entered)
from co_hist
where order_no = a.order_no
and message_text = 'Delivered')
-
(select max(date_entered)
from co_hist
where order_no = a.order_no
and instr(message_text,'Picklist') != 0
and instr(message_text,'picked') != 0), 'DAY') ) elapsed_picked_delivered
After the upgrade, the data returned from the same exact section of logic is: +000000000 16:25:10.000000000
I'm only still needing the 16:25:10
. Is there an easier way than using the substr()
function to strip the leading/trailing 0s?