Hello,
As a complete SQL newbie, could anyone show me how I can filter a simple custom SQL report have created?
The report detailed below simply shows the last reboot of every machine on our system, with an additional column showing the number of days since the last reboot.
I would like to filter this report to show only machines with greater than 30 days since the last reboot.
Here's my surrent SQL Query:
SELECT TOP 10000 Nodes.NodeID AS NodeID, Nodes.Caption AS NodeCaption, Cast(Device_Type As nvarchar(250)) as Device_Type, Nodes.LastBoot AS Last_Boot, DATEDIFF(day, Nodes.LastBoot, getdate()) AS no_of_days
FROM Nodes
WHERE ( (Nodes.Vendor = 'Windows') )
ORDER BY Last_Boot
As a newbie I'm struggling with this, but I'm sure this would be a piece of cake for the SQL guru's out there!
Any help would be very much apprieciated.
Thanks,