Oracle Database 11g Enterprise Edition Release 11.2.0.3.0
Hello,
We have a batch scheduling tool that automatically runs Oracle jobs and when it runs the jobs it stores a record from the instance in a table. I am trying to write a query that pulls up all of the jobs that ran today and compares them with what ran on the same day last week to find out what jobs didnt run today. So far I have the below but I can't get it to return anything. I am using Toad for this
select *
from xxcar_abat_instances
where trunc(to_date(start_datetime)) = trunc(sysdate-7)
and completion_status = 'Success'
AND NOT EXISTS
(select script_name
from xxcar_abat_instances
where trunc(to_date(start_datetime)) = trunc(sysdate)
and completion_status = 'Success')
Thank you