中国开发网: 论坛: 程序员情感CBD: 贴子 117117
sonfly: 1
select s.splsid,
s.wzjbxxId,
s.SpZt,
s.splzbID,
s.StepID,
s.StartTime,
(select top 1 stepid
from spldyb
where splzbid = s.splzbid
and stepid > s.stepid
order by stepid asc) nextStepid,
s.dqtpzt, -- 当前票数

d.tptgbl, -- 投票通过比率

(select count(1)
from groupitem
where groupid =1 ) tprs, -- 投票人数

--d.tptgbl/tprs dqbl, -- 当前投票通过比率

w.zt,
w.zz,
w.gpdm,
w.gpmc,
w.xghy,
w.bgrq,
w.bgflmc,
w.tzjymc,
w.zyxmc,
w.wzmjmc
from spls s, vwwzjbxx2 w, spldyb d
where d.splx = 2
and d.groupRoleID like '%1%'
and s.splzbid = d.splzbid
and s.stepid = d.stepid
and s.Spzt in (1)
and s.IsStepFinish = 0
and s.splsid not in (select splsid from tpls where tprid = 220)
and s.stepid <> 99
and w.wzjbxxid = s.wzjbxxid
and w.scbz <> 1

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录