I have a query that I get this error: PL/SQL: ORA-00909: invalid number of arguments
The purpose of this query is:
-- If execution (current) date is MON then get previous THU into v_begin_date.
-- If execution (current) date is THU then get previous MON into v_begin_date.
-- v_end_date is set to previous day.
-- date range will be THU through SUN for a MON execution.
-- date range will be MON through WED for a THU execution.
CASE TO_CHAR(SYSDATE, 'DY') WHEN 'MON' THEN 'THU' ELSE 'MON' END)) -7,
TRUNC(SYSDATE-1) INTO v_begin_date, v_end_date FROM dual;
What do I do wrong for this query (PL/SQL: ORA-00909: invalid number of arguments)?