我正在尝试在查询中使用数据透视,但出现错误:
ORA-00936 :缺少表达式
以下是我的查询:
select *
from t_product
PIVOT(
sum(jira_value)
FOR jira
in (['C_MIN'],['C_MAX'])
)
答案 0 :(得分:3)
摆脱方括号并用作:
select *
from t_product
PIVOT(
sum(jira_value) as sum_jira
FOR (jira)
in ('C_MIN' as c_min ,'C_MAX' as c_max )
);