→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
‎04-27-2010 08:06 PM
‎04-28-2010 03:21 PM
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[web40getnonactive]
AS SELECT DISTINCT
dbo.Web40OSName.Compimage AS Icon, dbo.tblComputers.ComputerUnique, dbo.tblComputers.Computername, dbo.tblComputers.Domain,
dbo.web40allcompstates.Statename AS [State Name], ISNULL(dbo.tblOperatingsystem.Description, '') AS Description,
dbo.tblComputers.LastknownIP AS IP, dbo.tblComputers.Lastseen
FROM dbo.tblComputers INNER JOIN
dbo.web40allcompstates ON dbo.tblComputers.Computername = dbo.web40allcompstates.Computername INNER JOIN
dbo.Web40OSName ON dbo.tblComputers.Computername = dbo.Web40OSName.Computername LEFT OUTER JOIN
dbo.tblOperatingsystem ON dbo.tblComputers.Computername = dbo.tblOperatingsystem.Computername
WHERE (dbo.web40allcompstates.Thestate > 1)
ORDER BY dbo.tblComputers.ComputerUnique
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[web40getnonactive]
AS SELECT DISTINCT
dbo.Web40OSName.Compimage AS Icon, dbo.tblComputers.ComputerUnique, dbo.tblComputers.Computername, dbo.tblComputers.Domain,
dbo.web40allcompstates.Statename AS [State Name], ISNULL(dbo.tblOperatingsystem.Description, '') AS Description,
dbo.tblComputers.LastknownIP AS IP, dbo.tblComputers.Lastseen
FROM dbo.tblComputers INNER JOIN
dbo.web40allcompstates ON dbo.tblComputers.Computername = dbo.web40allcompstates.Computername INNER JOIN
dbo.Web40OSName ON dbo.tblComputers.Computername = dbo.Web40OSName.Computername LEFT OUTER JOIN
dbo.tblOperatingsystem ON dbo.tblComputers.Computername = dbo.tblOperatingsystem.Computername
WHERE (dbo.web40allcompstates.Thestate = 2)
ORDER BY dbo.tblComputers.ComputerUnique
SELECT TOP (1000000) dbo.tblComputers.Domain, COUNT(dbo.tblComputers.Computername) AS cnt
FROM dbo.tblComputers INNER JOIN
dbo.web40allcompstates ON dbo.tblComputers.Computername = dbo.web40allcompstates.Computername
WHERE (dbo.web40allcompstates.Thestate <> 1)
GROUP BY dbo.tblComputers.Domain
SELECT TOP (1000000) dbo.tblComputers.Domain, COUNT(dbo.tblComputers.Computername) AS cnt
FROM dbo.tblComputers INNER JOIN
dbo.web40allcompstates ON dbo.tblComputers.Computername = dbo.web40allcompstates.Computername
WHERE (dbo.web40allcompstates.Thestate = 2)
GROUP BY dbo.tblComputers.Domain
‎04-28-2010 02:28 PM
SELECT dbo.tblComputers.Computername
FROM dbo.tblComputers LEFT OUTER JOIN
dbo.tblCompCustom ON dbo.tblComputers.Computername = dbo.tblCompCustom.Computername
WHERE (dbo.tblCompCustom.Computername IS NULL) OR
(dbo.tblCompCustom.State = 1)
SELECT dbo.tblComputers.Computername
FROM dbo.tblComputers LEFT OUTER JOIN
dbo.tblCompCustom ON dbo.tblComputers.Computername = dbo.tblCompCustom.Computername
WHERE (dbo.tblCompCustom.Computername IS NULL) OR
(dbo.tblCompCustom.State <> 2)
‎04-27-2010 10:04 PM
‎04-27-2010 10:00 PM
‎04-27-2010 09:53 PM
‎04-27-2010 08:17 PM
ALTER PROCEDURE [dbo].[Web40FindsoftwareName](@soft nvarchar(400))
AS SELECT DISTINCT
dbo.tblComputers.ComputerUnique, dbo.tblComputers.Domain, dbo.Web40OSName.Compimage AS Icon, dbo.tblComputers.Computername,
ISNULL(dbo.tblComputers.Description, N'') AS Description, dbo.tblSoftware.softwareName AS Software, dbo.tblSoftware.softwareVersion AS Version,
dbo.tblComputers.Lastseen
FROM dbo.tblComputers INNER JOIN
dbo.tblSoftware ON dbo.tblComputers.Computername = dbo.tblSoftware.ComputerName INNER JOIN
dbo.web40ActiveComputers ON dbo.tblComputers.Computername = dbo.web40ActiveComputers.Computername INNER JOIN
dbo.Web40OSName ON dbo.tblComputers.Computername = dbo.Web40OSName.Computername LEFT OUTER JOIN
dbo.tblComputersystem ON dbo.tblComputers.Computername = dbo.tblComputersystem.Computername
WHERE (dbo.tblSoftware.softwareName = @soft)
ORDER BY dbo.tblComputers.ComputerUnique
ALTER PROCEDURE [dbo].[Web40FindsoftwareName](@soft nvarchar(400))
AS SELECT DISTINCT
tblComputers.ComputerUnique, tblComputers.Domain, Web40OSName.Compimage AS Icon, tblComputers.Computername,
ISNULL(tblComputers.Description, N'') AS Description, tblSoftware.softwareName AS Software, tblSoftware.softwareVersion AS Version,
tblComputers.Lastseen
FROM tblComputers INNER JOIN
tblSoftware ON tblComputers.Computername = tblSoftware.ComputerName INNER JOIN
Web40OSName ON tblComputers.Computername = Web40OSName.Computername LEFT OUTER JOIN
tblComputersystem ON tblComputers.Computername = tblComputersystem.Computername
WHERE (tblSoftware.softwareName = @soft)
ORDER BY tblComputers.ComputerUnique
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now