SQL Query not running agains selected source after upgrade
I had a simple SQL Query that ran properly until upgrading from 19.0.40.0 to 19.3.42.0.
When manually selecting the collection source offline systems are still showing up in the results when the collection that is selected should only be showing online systems only,
When I even select a collection that has only 2 systems listed the results still show a list of 30 results.
SELECT
Computers.Name as "Computer Name",
Computers.IPAddress AS 'IP Address',
Computers.CurrentUser AS 'Current User',
Computers.SimpleReasonForReboot AS 'Reason For Reboot',
date(Computers.BootTime) AS 'Boot Time'
FROM Computers WHERE SimpleReasonForReboot LIKE 'Windows Updates asked for a reboot%'
ORDER BY Computers.BootTime;
Comments
SQL Reports need to have the following clause in order to work with Select Collection Source:
I do have the WHERE clause in the query.
WHERE Computers.SimpleReasonForReboot LIKE 'Windows Updates asked for a reboot%'
You'll have to modify it like this:
I see the issue. I had to add the AND IsOnline
SELECT
Name AS 'Computer Name',
BootTime,
IPAddress AS 'IP Address',
IsOnline, CurrentUser AS 'Current User',
SimpleReasonForReboot AS 'Reboot Reason'
FROM Computers
WHERE SimpleReasonForReboot LIKE 'Windows Updates asked for a reboot%' AND IsOnline
ORDER BY Computers.Name;
Thank you