以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  统计条件代码  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=66008)

--  作者:一笑
--  发布时间:2015/3/27 14:20:00
--  统计条件代码
想统计性质严重的事件次数,第一句代码没问题
1. Dim cnt6 As Integer = DataTables("事件汇总").Compute("count([事件])", Filter & " And 性质 = \'严重\' ")

但还想加上性质轻度的事件次数,测试结果统计不准确,请问以下代码有什么问题,谢谢

Dim cnt6 As Integer = DataTables("事件汇总").Compute("count([事件])", Filter & " And 性质 = \'严重\' or 性质 = \'轻度\'")
--  作者:有点甜
--  发布时间:2015/3/27 14:51:00
--  
Dim cnt6 As Integer = DataTables("事件汇总").Compute("count([事件])", Filter & " And (性质 = \'严重\' or 性质 = \'轻度\')")