sql server 三目运算符

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,C++,SQL Server,C#)