I am running this query to get a list of jobs
select --job_name, job_type, job_action, start_date, repeat_interval, enabled, state, last_start_date, last_run_duration, next_run_date, comments
"OWNER", JOB_NAME, JOB_STYLE, JOB_CREATOR, JOB_TYPE, JOB_ACTION, NUMBER_OF_ARGUMENTS, SCHEDULE_TYPE, START_DATE, REPEAT_INTERVAL, JOB_CLASS, ENABLED, AUTO_DROP, RESTART_ON_RECOVERY, RESTART_ON_FAILURE,
STATE, JOB_PRIORITY, RUN_COUNT, FAILURE_COUNT, RETRY_COUNT, --LAST_START_DATE,
LAST_START_DATE at time zone 'PST' as LAST_START_DATE,
LAST_RUN_DURATION, --NEXT_RUN_DATE,
NEXT_RUN_DATE at time zone 'PST' as NEXT_RUN_DATE,
SCHEDULE_LIMIT, MAX_RUN_DURATION, RAISE_EVENTS, COMMENTS
from all_scheduler_jobs
--where state != 'DISABLED'
--order by last_start_date desc nulls last
order by state desc, owner, job_name
This works fine in Oracle SQL Developer Java version (23.1.1.345).
But it does not work in the VS Code version (VS Code 1.92.2, Oracle SQL Developer plugin 24.2.1).
Target database is 19.24 Standard Edition
I get this error:
It looks like it wants a semicolon at the end, but if I update the query to include a semicolon, I just get the error “An error occurred while running the statement”
I tried removing the commented out parts to no avail
I tried to remove the quotes on “OWNER” in the query and that did not help.
I tried putting “state” or “STATE” since it is colored blue like a keyword. This returns error ORA-00904: “state”: invalid identifier.
Any idea what is wrong? Is it a bug?
Thank you