Here is my code:
SELECT A.Caption, A.NodeID, B.CustomPollerAssignmentID, C.CustomPollerAssignmentID AS ID2, C.CompressedRowID, A.Vendor, C.Status
FROM Orion.Nodes A
JOIN Orion.NPM.CustomPollerAssignmentOnNode B ON B.NodeID = A.NodeID
JOIN Orion.NPM.CustomPollerStatusOnNodeTabular C ON C.CustomPollerAssignmentID = B.CustomPollerAssignmentID
Where A.Vendor = 'AB Systems' AND C.CompressedRowID LIKE '2' AND A.MachineType NOT LIKE 'AB-70%'
And it produces this output:
Caption | NodeID | CustomPollerAssignmentID | ID2 | CompressedRowID | Vendor | Status |
node65 | 4991 | 5e0033ab-cc27-44cd-b656-008c0851ca21 | 5e0033ab-cc27-44cd-b656-008c0851ca21 | 2 | AB Systems | 0 |
node77 | 5530 | 97daeec5-25eb-4a4b-9826-03c53c805f99 | 97daeec5-25eb-4a4b-9826-03c53c805f99 | 2 | AB Systems | 3 |
node679 | 4976 | 53bad370-4ea6-466a-8a7c-03db21eb6c0a | 53bad370-4ea6-466a-8a7c-03db21eb6c0a | 2 | AB Systems | 1 |
node652 | 5382 | cdd71c4f-8319-442f-82fc-05093f7a9eda | cdd71c4f-8319-442f-82fc-05093f7a9eda | 2 | AB Systems | 0 |
node79 | 4949 | bc4edc6e-4c15-497b-8274-05697dc59fad | bc4edc6e-4c15-497b-8274-05697dc59fad | 2 | AB Systems | 0 |
node934 | 5541 | b7454ae6-bfc4-4fc2-b2fd-06157756f95a | b7454ae6-bfc4-4fc2-b2fd-06157756f95a | 2 | AB Systems | 0 |
node787 | 5385 | 7949bce1-09d5-4fa5-9225-0a642bd0ffec | 7949bce1-09d5-4fa5-9225-0a642bd0ffec | 2 | AB Systems | 0 |
node12 | 5037 | b093394b-93ba-4094-a2c5-0a6be3755a06 | b093394b-93ba-4094-a2c5-0a6be3755a06 | 2 | AB Systems | 0 |
node91 | 5614 | eace7595-9371-4ce9-a0cf-0aa777a57491 | eace7595-9371-4ce9-a0cf-0aa777a57491 | 2 | AB Systems | 0 |
node52 | 4708 | 01172e20-869f-4168-9cfc-0b9649acaf97 | 01172e20-869f-4168-9cfc-0b9649acaf97 | 2 | AB Systems | 0 |
etc... | | | | | | |
So I want to evaluate status (which is cpu percentage represented as an integer I thought). Many methods exist going back years in the forums, but none seem to work.
I want to add "AND Status > 10" to the last line to only give me lines where the status is greater than 10%.
I get errors like
Status > 10 (This one is odd because sometimes it gives me an alpha match with things past 1, so 2, 3, 4, all match and other times it shows an error like below)
"Conversion failed when converting the nvarchar value '55.95' to data type int." (I don't know where 55.95 came from, only ints in Status)
Abs(Status) > 10
"Error converting data type nvarchar to float"
So everything I did ended with some sort of error. "Status" is a custom poller, what do I need to do to evaluate it and only list numeric values?