case when c.zsdecScore is null then 0 else c.zsdecScore end
select c.dutydeptname,c.dutydeptcode,c.stdscore, c.targettype,c.zsdecScore,(c.stdscore-(case when c.zsdecScore is null then 0 else c.zsdecScore end)
)/c.stdscore*100 as avg
应该是:
select case when col <=0 then 0 else col end
本文探讨了SQL中使用CASE WHEN语句进行条件判断的应用场景,特别是针对评分数据的处理方式。通过具体的SQL语句示例,展示了如何根据不同情况计算标准化分数与平均分的变化百分比。
1443

被折叠的 条评论
为什么被折叠?



