‎03-26-2008 05:36 PM
SELECT dbo.tblComputers.Computername AS Computer, dbo.tblOperatingsystem.Description, dbo.tblComputers.Domain,
dbo.tblOperatingsystem.Lastbootuptime AS [Last bootup]
FROM dbo.tblComputers LEFT OUTER JOIN
dbo.tblOperatingsystem ON dbo.tblComputers.Computername = dbo.tblOperatingsystem.Computername
WHERE (dbo.tblOperatingsystem.Lastbootuptime < GETDATE() - 30)
‎03-28-2008 12:51 PM
CREATE VIEW dbo.web30repnotrebooted30days
AS
SELECT dbo.tblComputers.Computername AS Computer, dbo.tblOperatingsystem.Description, dbo.tblComputers.Domain,
dbo.tblOperatingsystem.Lastbootuptime AS [Last bootup]
FROM dbo.tblComputers LEFT OUTER JOIN
dbo.tblOperatingsystem ON dbo.tblComputers.Computername = dbo.tblOperatingsystem.Computername
WHERE (CONVERT(char(8), dbo.tblOperatingsystem.Lastbootuptime, 120) < GETDATE() - 30)
GO
INSERT INTO [tsysreports] ([Reportquery],[Reporttitle]) VALUES ('web30repnotrebooted30days','Computers without reboot for more than 30 days')
GO
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now