ORA-06550: When Run query in APEX
618092Apr 8 2010 — edited Apr 9 2010Hi I am running this query it runs fine in SQL developer but when I put this in a string in APEX return me error where the case staement returning values, Could you please help me in this regard
declare
l_query varchar2(4000) := '' ;
begin
l_query := 'select
a.TIMESHEET_ID, b.LAST_NAME || '', '' || b.FIRST_NAME NAME,
to_char(a.DAY_START,'dd/mm/yyyy hh24:mi') DAY_START,
to_char(a.DAY_END,'dd/mm/yyyy hh24:mi') DAY_END,
a.BREAK_IN_HOURS, round(a.TOTAL_WORK_HOURS,2) TOTAL_WORK_HOURS,
c.DESCRIPTION Timesheet_Status,
nvl((select sum(x.duration_hours) from eba_timesheet_detail x where a.timesheet_id = x.timesheet_id) ,0) detail_hours,
case when round(a.TOTAL_WORK_HOURS,2) != (nvl((select sum(x.duration_hours) from eba_timesheet_detail x where a.timesheet_id = x.timesheet_id) ,0))
then 'YES' else 'NO'
end as inconsistent
from EBA_TIMESHEET_HDR a, EBA_TIMESHEET_USERS b, EBA_TIMESHEET_STATUS c
where a.USER_ID = b.ID and a.TIMESHEET_STATUS_ID = c.ID ';