改后是这样
SQL("JDBC3", "SELECT avg(VAL) FROM " + $P1 + " WHERE (POINTID = 'YBPer1_tBlrMnStm_H.S') AND DUTYID = 3 AND CLOSED <>1 or CLOSED is null AND DAY(ETIME)>=" + ($P3 - 10) + " AND DAY(ETIME)<" + $P3, 1)
改后是这样
SQL("JDBC3", "SELECT avg(VAL) FROM " + $P1 + " WHERE (POINTID = 'YBPer1_tBlrMnStm_H.S') AND DUTYID = 3 AND CLOSED <>1 or CLOSED is null AND DAY(ETIME)>=" + ($P3 - 10) + " AND DAY(ETIME)<" + $P3, 1)
取值不对啊,哪错了,请帮助!!
select * from 表1 where closed<>1 or closed is null
是在SQL2000上运行的,你上面语句,是在那里运行的。