[url=]图片[/url]file:///C:\Users\10313\AppData\Roaming\Tencent\Users\1031398450\QQ\WinTemp\RichOle\~)YY]X67J`@HXLREX7PCB2X.png
这里判断值是不是为空,也就是不用等号,参数值是is null,怎么设置?
SELECT d.FName '乡镇名称',c.Fname '客户名称',c.FLinkman1 '联系人',c.FMobilePhone1 '电话',a.FTime '掉线时间',b.FSerial '序列号',b.FName '设备名称',a.Warning_Type_ID '预警类型'
FROM dbo.Entity_Electric_Detector_CurrentValue a JOIN dbo.Entity_DeviceInfo b ON a.Device_ID=b.ID JOIN dbo.Entity_Customer c ON b.Customer_ID=c.ID JOIN dbo.Entity_Town d ON c.Town_ID=d.ID
WHERE a.Warning_Type_ID=1 AND b.IsHomeWell =@is_HW AND c.City_ID = @city
ORDER BY d.ID,c.Fname,a.FTime
-- =@is_HW 有的值是1,有的无值
|