This content has been marked as final. Show 2 replies
Building on your existing query, I added and additional where clause that should get you what you need. Give it a shot and let me know how it works.
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') ) AND DATEDIFF(day, Nodes.LastBoot, getdate()) > 30 ORDER BY Last_Boot
That works great!
Thanks for your help.