I'm getting a missing keyword error here. I recently added the WHERE clause and that's when the missing keyword error came up.
Select job_id,
(Case :P1_DATE_CHOOSER
WHEN 'Daily' THEN trunc(start_time)
WHEN 'Weekly' THEN trunc(start_time, 'WW')
WHEN 'Monthly' THEN trunc(start_time, 'MM')
END) "START_DATE",
1440*(END_TIME - START_TIME) "RUN_TIME"
from NI_INFA_ACTIVITY_LOG_V
WHERE
(Case :P1_JOB_SIZE_CHOOSER
WHEN 'Small' THEN (1440*(END_TIME - START_TIME)) <= 5
WHEN 'Medium' THEN (1440*(END_TIME - START_TIME)) > 5 AND
(1440*(END_TIME - START_TIME)) <= 20
WHEN 'Large' THEN (1440*(END_TIME - START_TIME)) > 20
Else (1440*(END_TIME - START_TIME)) > 0
END)
Any help would be appreciated.
Do it in this way: