Sample Header Ad - 728x90

SQL80001 - incorrect syntax near ')'

1 vote
1 answer
1832 views
In the below code (that I've inherited), I'm getting the message "SQL80001 - incorrect syntax near ')'", the error being on the third line from the bottom with the + sign. I've looked at THIS SO answer to similar issues, but that wasn't the issue here. select b.batch_id, b.submitted_dt, b.batch_nm, b.paused_cd, b.job_cnt, b.start_dt, b.finish_dt, m.module_nm, m.module_id, mc.hostname from tbl_bat_chess b, tbl_job_bobs j, tbl_man_holes m, tbl_monkey_cokes mc where b.finish_dt is null and to_char(b.submitted_dt, 'DD-MON-YYYY') = to_char(sysdate, 'DD-MON-YYYY') and (to_number(sysdate - b.submitted_dt) * 1440) > 5 -- 5 minutes and b.batch_id = j.batch_id and b.batch_nm like '%EXAMPLE%' and j.module_id = m.module_id and m.proc_group_id not in (10, 18) and j.machine_id = mc.machine_id (+) group by b.batch_id, b.submitted_dt, b.batch_nm, b.paused_cd, b.job_cnt, b.start_dt, b.finish_dt, m.module_nm, m.module_id, mc.hostname order by submitted_dt desc **DBMS:** PLSQL Developer 10.05. **Oracle Version:** 11g I've manually removed all non-breaking spaces and tried putting square brackets around the line mc.machine_id with no success. How should this be resolved?
Asked by Gregg Bursey (119 rep)
Oct 29, 2015, 02:07 PM
Last activity: Feb 13, 2018, 06:30 PM