Hi All,
I am trying to understand the right way to ask a query on a value inside a table row that is NOT equal to two numbers - in my example is 14 and 6.
The idea is:
- If Polled value - is it NOT equal to 14 YES/NO AND also is it NOT equal to 6 YES/NO - Only if I am getting YES on Not 6 and Not 14 I will trigger the alert.
I have two queries that I need to be sure that they are working in the right way since I can not change the RT value in the device.
The two are as follow:
Bear in mind that I have NOT yet used the SWQL on SolarWinds and I am not even sure my syntax is correct for doing what I want to.
QUESTION: Not equal sign is != or <>?
SELECT E0.[Uri], E0.[DisplayName]
FROM Orion.NPM.CustomPollerStatusOnNodeTabular AS E0
WHERE ( ( E0.[CustomPollerAssignment].[CustomPoller].[UniqueName] = 'DataPower_RaiBattaryVoltage' ) AND
( E0.[CustomPollerAssignment].[Node].[CustomProperties].[Department] = 'datapower' ) AND (( E0.
[RawStatus] != '14' ) AND ( E0.[RawStatus] != '6' )) )
OR this one:
SELECT E0.[Uri], E0.[DisplayName]
FROM Orion.NPM.CustomPollerStatusOnNodeTabular AS E0
WHERE ( ( E0.[CustomPollerAssignment].[CustomPoller].[UniqueName] = 'DataPower_RaiBattaryVoltage' ) AND
( E0.[CustomPollerAssignment].[Node].[CustomProperties].[Department] = 'datapower' ) AND
( E0.[RawStatus] NOT IN (14,6)) )
What would be the RIGHT way to query the values?
Thanks