

























存储过程问题:
case q9 when 0 then '+''''+'新單'+''''+'
when 1 then '+''''+'再協商'+''''+' end
as jb
假如我要换成 q9<=100 && q9>=85 的判断怎么改?
方法一: set @strSql = 'select case when (q9<=100 and q9>=85) then '+''''+'A'+''''+' when (q9<=84 and q9>=70) then '+''''+'B'+''''+' when (q9<=69 and q9>=55) then '+''''+'C' +''''+' when (q9<=54 and q9>=40) then '+''''+'D'+''''+' when (q9<40) then '+''''+'E'+''''+' end as jb,* from jdkh'
方法二: case when q9 between 85 and 100 then '+''''+'新單'+''''+' when 1 then '+''''+'再協商'+''''+'
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=1694638
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。