Mohan
Mohan

Reputation: 248

Using pivot and getting Error missing Expression

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'])
   )

Upvotes: 0

Views: 828

Answers (1)

Barbaros Özhan
Barbaros Özhan

Reputation: 65363

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 )
   );

Upvotes: 3

Related Questions