这是我遇到的错误: 语法错误在" as"
CASE WHEN ver_desc_txt = 'BEST OFFICIAL PROJECTION' THEN round(sum(d.spcl_prc_grs_sls_amt::double precision / f.exch_rate)::numeric, 2) as BOP_gr_sales_dol
不太明白为什么。所以需要你的帮助
答案 0 :(得分:2)
您似乎错过了END
语句的CASE
部分。
CASE WHEN ver_desc_txt = 'BEST OFFICIAL PROJECTION' THEN
round(sum(d.spcl_prc_grs_sls_amt::double precision / f.exch_rate)::numeric, 2) as BOP_gr_sales_dol
应该......
CASE WHEN ver_desc_txt = 'BEST OFFICIAL PROJECTION' THEN
round(sum(d.spcl_prc_grs_sls_amt::double precision / f.exch_rate)::numeric, 2) END as BOP_gr_sales_dol