Y
yyss
Unregistered / Unconfirmed
GUEST, unregistred user!
with adoquery1 do<br> begin<br> Close;<br> SQL.Clear;<br> SQL.Add('update tb_bmljzs SET<br> bzrs=(select count from tb_main where danwei=:dw and bzcy='是'),<br> bzzs=(select avg(ljzs) from tb_main where danwei=:dw and bzcy='是'),<br> ljrs=(select count from tb_main where danwei=:dw and ljzs>=8),<br> bjlrs=(select count from tb_main where danwei=:dw and (ljzs>=6 and ljzs<8)),<br> blrs=(select count from tb_main where danwei=:dw and ljzs<6),<br> sjrs=(select count from tb_main where danwei=:dw and (ljzs>=7 and ljzs<8)),<br> ejrs=(select count from tb_main where danwei=:dw and (ljzs>=6 and ljzs<7)),<br> yjrs=(select count from tb_main where danwei=:dw and ljzs<6)<br> where danwei=:dw');<br> parameters.ParamByName('dw').Value:='%'+Trim(edit1.Text)+'%';<br> open;<br> end;