Using pivot and getting Error missing Expression

809 views Asked by At

i am trying to use pivot in my query but getting error :

ORA-00936 : missing expression

below is my query :

select *
  from t_product
  PIVOT(
  sum(jira_value)
   FOR jira
   in (['C_MIN'],['C_MAX'])
   )
1

There are 1 answers

0
Barbaros Özhan On

Get rid of square brackets and use as :

select *
  from t_product
  PIVOT(
  sum(jira_value) as sum_jira
   FOR (jira)
   in ('C_MIN' as c_min ,'C_MAX' as c_max )
   );