SELECT PRCSINSTANCE
, PRCSNAME
, OPRID
, RUNCNTLID
, SERVERNAMERUN
, RQSTDTTM
, RUNDTTM
, BEGINDTTM
, ENDDTTM
, floor(TO_CHAR((enddttm-begindttm)*24*60)) AS MINUTES
, lpad(FLOOR(((TO_CHAR((enddttm-begindttm)*24*60))-floor(TO_CHAR((enddttm-begindttm)*24*60)))*60),2,0) AS SECONDS
, decode (FLOOR(TO_CHAR((enddttm-begindttm)*24*60))||':'||lpad(FLOOR(((TO_CHAR((enddttm-begindttm)*24*60))-floor(TO_CHAR((enddttm-begindttm)*24*60)))*60),2,0)
, ':'
,' '
,FLOOR(TO_CHAR((enddttm-begindttm)*24*60))||':'||lpad(FLOOR(((TO_CHAR((enddttm-begindttm)*24*60))-floor(TO_CHAR((enddttm-begindttm)*24*60)))*60),2,0)) AS MINSEC
,RUNSTATUSDESCR
FROM PS_PMN_PRCSLIST
ORDER BY RUNDTTM DESC
Contributed by Arshad Ali
No comments:
Post a Comment