Invalid exists/not exists condition: ORA-00928: missing SELECT keyword
363770Jun 24 2008 — edited Jun 25 2008I am getting errors when I edit the source region and add the sql I want to run in the report. If I run the following query in sqlplus with the schema owner substituted for OWNER it works fine.
SELECT TK_IN_TIME
from "#OWNER#"."TIME_KEEPING_T"
I also run the following code in sqlplus and it works perfect, but from the source region I get a divide by 0 error.
select dt,to_char(trunc(mod((elaps)*24,24)),'fm00')||':'||
to_char(trunc(mod((elaps)*24*60,60)),'fm00')||':'||
to_char(trunc(mod((elaps)*24*60*60,60)),'fm00') ELAPSED
from
(
select trunc (tk_in_time) dt, sum(tk_out_time-tk_in_time) elaps
from time_keeping_t
group by trunc(tk_in_time)
)
order by dt
/
What is so different between the source region and sqlplus. I need to have this query run in my report and unfortunately, it doesn't seem possible. I'm about to give up on APEX and try something different.