Page 1 of 1

Update Wua with a status other than OK

Published: March 8, 2024 - 2:58 PM
by ml71200
Hello,

I'd like to create a report for machines with a status other than "OK" for WUA.

I tried this, but my WHERE clause is causing a problem.
If I remove the WHERE clause, it displays everything

: SELECT DISTINCT hosts.computer_name, hosts.uuid, waptwua_status->'status' as status
FROM hosts
WHERE waptwua_status->'status' != 'OK'
ORDER BY hosts.computer_name ASC;



Thank you in advance for your help.

Re: Wua update with a status other than OK

Published: March 9, 2024 - 7:24 PM
by ml71200
I just found it for pending updates

Code: Select all

SELECT DISTINCT hosts.computer_name,hosts.uuid,waptwua_status->'status' as status
FROM hosts
WHERE waptwua_status @> '{"status" : "PENDING_UPDATES"}';
Good day.