达人们救命啊
小弟执行下面这段程序,总是报错,请求指点,不甚感激select alarmGrade, stattime, cfg.ipaddr, cfg.sevice,
case alarmItem when 1 then '非关键业务带宽占用率'+valveExp+valveValue+'%'
else '非关键业务带宽占用量'+valveExp+valveValue end as alarmCond,
case alarmItem when 1 then 1-sum(sendbytes+recvbytes)/200000 else sum(sendbytes+recvbytes) end as alarmValue
from alarm_cfg as cfg, user_traffic as uData
where cfg.sevice=uData.sevice and case when cfg.ipaddr=-1 then 1 else cfg.ipaddr=uData.ipaddr end and stattime>100
group by cfg.sevice, cfg.ipaddr, cfg.alarmGrade, cfg.alarmItem, cfg.valveExp, cfg.valveValue
having (case alarmItem when 1
then case valveExp when '=' then 1-sum(sendbytes+recvbytes)/200000=valveValue
when '<' then 1-sum(sendbytes+recvbytes)/200000<valveValue
when '>' then 1-sum(sendbytes+recvbytes)/200000>valveValue
else 1-sum(sendbytes+recvbytes)/200000<>valveValue
end
else case valveExp when '=' then sum(sendbytes+recvbytes)=valveValue
when '<' then sum(sendbytes+recvbytes)<valveValue
when '>' then sum(sendbytes+recvbytes)>valveValue
else sum(sendbytes+recvbytes)<>valveValue
end
end=1);