这个非法的0长度标识符是哪里错了呢else之后的值为0不行嘛

image.png如图所示报错非法0长度是什么意思呢,我这个esle之后的0给单引号和不给都是包这个错image.pngselect t.rq, t2.rybh, t4.zgxm, t4.bmbh, t5.bmmc, t2.khdh, t2.zhmc, t.lc_cph, t3.prod_name, case when prod_name like '%保本%' or prod_name like '%慧盈%' or prod_name like '%龙盈(定向)59号%' or prod_name like '%龙盈(定向)60号%' or prod_name like '%龙盈(定向)60号%' or prod_name like '%龙盈48期%' or prod_name like '%新盈168号%' then t.lcfe_nrj * t2.qz else '0' end bblcnrj, case when prod_name not like '%保本%' and prod_name not like '%慧盈%' and prod_name not like '%龙盈(定向)59号%' and prod_name not like '%龙盈(定向)60号%' and prod_name not like '%龙盈(定向)60号%' and prod_name not like '%龙盈48期%' and prod_name not like '%新盈168号%' then t.lcfe_nrj * t2.qz else '0' end fblcnrj, case when prod_name like '%保本%' or prod_name like '%慧盈%' or prod_name like '%龙盈(定向)59号%' or prod_name like '%龙盈(定向)60号%' or prod_name like '%龙盈(定向)60号%' or prod_name like '%龙盈48期%' or prod_name like '%新盈168号%' then t.lcfe_yrj * t2.qz else '0' end bblcyrj, case when prod_name not like '%保本%' and prod_name not like '%慧盈%' and prod_name not like '%龙盈(定向)59号%' and prod_name not like '%龙盈(定向)60号%' and prod_name not like '%龙盈(定向)60号%' and prod_name not like '%龙盈48期%' and prod_name not like '%新盈168号%' then t.lcfe_yrj * t2.qz else '0' end fblcyrj, case when prod_name like '%保本%' or prod_name like '%慧盈%' or prod_name like '%龙盈(定向)59号%' or prod_name like '%龙盈(定向)60号%' or prod_name like '%龙盈(定向)60号%' or prod_name like '%龙盈48期%' or prod_name like '%新盈168号%' then t.lcfe * t2.qz else '0' end bblcye, case when prod_name not like '%保本%' and prod_name not like '%慧盈%' and prod_name not like '%龙盈(定向)59号%' and prod_name not like '%龙盈(定向)60号%' and prod_name not like '%龙盈(定向)60号%' and prod_name not like '%龙盈48期%' and prod_name not like '%新盈168号%' then t.lcfe * t2.qz else '0' end qtlcye from LCZHMX_RJB t left join (SELECT CARD, MAX(ACCOUNT) ACCOUNT FROM link GROUP BY CARD) t1 on substr(t1.card, 5, 16) = t.kh left join kmryzhqdck t2 on t2.zhdh = substr(t1.account, 1, 16) left join FNC_PROD_INFO t3 on t3.prod_code = t.lc_cph left join ryb t4 on t4.rybh = t2.rybh left join bmb t5 on t5.bmbh = t4.bmbh where t.rq in (select max(rq) from LCZHMX_RJB where rq <= '#sjrq') and t2.rybh like '%#rybh' and exists (select zbmbh from bmybmdyb b where t4.bmbh=b.zbmbh and b.bmbh = '#bmbh')"有没有大佬帮忙看看

FineReport 木子一丶 发布于 2024-12-11 14:16
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共2回答
最佳回答
0
木子一丶Lv2见习互助
发布于2024-12-11 14:38

最后多了个双引号

最佳回答
0
华莉星宸Lv7资深互助
发布于2024-12-11 14:19

你这参数写法不对吧

image.png

image.png

  • 木子一丶 木子一丶(提问者) 这个后面要改,写成参数之后我就不能打开这个数据源去拉字段进表格了,报错跟这个没关系
    2024-12-11 14:21 
  • 华莉星宸 华莉星宸 回复 木子一丶(提问者) 你把where 后面的都先删掉 改成 where 1=2 看看报错吗
    2024-12-11 14:23 
  • 华莉星宸 华莉星宸 回复 木子一丶(提问者) else 后面直接写0,不要单引号
    2024-12-11 14:25 
  • 木子一丶 木子一丶(提问者) 回复 华莉星宸 前面就是写的0也是这个错误
    2024-12-11 14:26 
  • 木子一丶 木子一丶(提问者) 回复 华莉星宸 不能用case when 嘛
    2024-12-11 14:28 
  • 1关注人数
  • 26浏览人数
  • 最后回答于:2024-12-11 14:38
    请选择关闭问题的原因
    确定 取消
    返回顶部