ORACLE error 00933
625324May 27 2008 — edited May 27 2008DECLARE
l_query VARCHAR2(4000) := NULL;
BEGIN
l_query := 'SELECT time_sheet.emp_id,
time_sheet.proj_id,
time_sheet.proj_task,
time_sheet.currrent_date
FROM
time_sheet';
IF :P7_EMP_CODE is not null THEN
l_query := l_query || ' AND time_sheet.emp_code = ''' || :P7_EMPLOYEE_CODE || '''';
END IF;
IF :P7_FROM_DATE is not null THEN
l_query := l_query || ' AND currrent_date >= from_date(''' || :P7_FROM_DATE || ''') ';
END IF;
IF :P7_TO_DATE is not null THEN
l_query := l_query || ' AND currrent_date <= to_date(''' || :P7_TO_DATE || ''') ';
END IF;
l_query := l_query || ' group by time_sheet.emp_id, time_sheet.proj_id, time_sheet.currrent_date, time_sheet.proj_task ';
wwv_flow.debug(l_query);
RETURN l_query;
END;
i fired this query but getting the following error
failed to parse SQL query
ORA-00933 SQL command not properly ended