I have created this query to report the start, end and duration of a group of jobs on a daily basis.
When I run the query I get no output. Could someone please check and advise.
I am running version 6.04
select distinct JOBNAME, schedtab
, to_char(to_timestamp(trim(timestmp)
, 'YYYYMMDDHH24MISS') - numtodsinterval(elaptime / 100
, 'SECOND'), 'YYYY-MM-DD HH24:MI:SS') as start_time
, to_char(to_date(trim(timestmp), 'YYYYMMDDHH24MISS')
, 'YYYY-MM-DD HH24:MI:SS') as end_time
, substr(to_char(numtodsinterval(elaptime / 100, 'SECOND')
, 'HH24:MI'), 12, as duration
from CMR_RUNINF
where timestmp=to_char(SYSDATE,'YYYY-MM-DD HH24:MI:SS')
and schedtab like '%GHOIT%'
order by duration desc
Control SQL Query
- philmalmaison
- Nouveau
- Posts: 1148
- Joined: 08 Jun 2007 12:00
- Location: Ile de France
- th_alejandro
- Nouveau
- Posts: 188
- Joined: 26 Nov 2008 12:00
- Location: Bogotá
Hi
DO not use this table, connect to EMUSER database (not CTM). Localize your active net name from :
SELECT active_net_name INTO vactive_netname
FROM emuser.comm ;
with this vactive_netname, localize the tabla X${vactive_netname}JOB and make you select on this table.
SELECT active_net_name INTO vactive_netname
FROM emuser.comm ;
with this vactive_netname, localize the tabla X${vactive_netname}JOB and make you select on this table.
- philmalmaison
- Nouveau
- Posts: 1148
- Joined: 08 Jun 2007 12:00
- Location: Ile de France