sql - ORA-00923: FROM keyword not found where expected using case statement -


i'm trying run query, getting following error : ora-00923: keyword not found expected.

select  case when  trunc( mgm.period_start_time, 'mi' ) < (trunc( mgm.period_start_time, 'hh' ) +numtodsinterval( 15, 'minute' ))          trunc( mgm.period_start_time, 'hh' )         when  trunc( mgm.period_start_time, 'mi' ) < (trunc( mgm.period_start_time, 'hh' ) +numtodsinterval( 30, 'minute' ))          (trunc( mgm.period_start_time, 'hh' ) +numtodsinterval( 15, 'minute' ))         when  trunc( mgm.period_start_time, 'mi' ) < (trunc( mgm.period_start_time, 'hh' ) +numtodsinterval( 45, 'minute' ))          (trunc( mgm.period_start_time, 'hh' ) +numtodsinterval( 30, 'minute' ))          else (trunc( mgm.period_start_time, 'hh' ) +numtodsinterval( 45, 'minute' ))          end trunc(mgm.period_start_time ,'mi') period_start_time,          sum(test_date) on (order trunc(mgm.period_start_time, 'mi') range between interval '0' minute preceding , interval '60' minute following ) sum_total  mgm 

your error here:

end trunc(mgm.period_start_time ,'mi') period_start_time 

this should be

end period_start_time 

Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -