oracle - SQL error: Missing keyword? -
i'm getting missing keyword error here. added clause , that's when missing keyword error came up.
select job_id, (case :p1_date_chooser when 'daily' trunc(start_time) when 'weekly' trunc(start_time, 'ww') when 'monthly' trunc(start_time, 'mm') end) "start_date", 1440*(end_time - start_time) "run_time" ni_infa_activity_log_v (case :p1_job_size_chooser when 'small' (1440*(end_time - start_time)) <= 5 when 'medium' (1440*(end_time - start_time)) > 5 , (1440*(end_time - start_time)) <= 20 when 'large' (1440*(end_time - start_time)) > 20 else (1440*(end_time - start_time)) > 0 end)
any appreciated.
do in way:
.... .... :p1_job_size_chooser = 'small' , (1440*(end_time - start_time)) <= 5 or :p1_job_size_chooser = 'medium' , (1440*(end_time - start_time)) > 5 , (1440*(end_time - start_time)) <= 20 or :p1_job_size_chooser = 'large' , ((1440*(end_time - start_time)) > 20 or :p1_job_size_chooser not in('small','medium','large') , (1440*(end_time - start_time)) > 0
Comments
Post a Comment