→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
‎07-14-2021 11:17 AM
‎07-16-2021 06:19 PM
FROMDomainRole 0 and 1 are standalone and member workstations, respectively. DomainRole 2, 3, 4, 5 are servers.
...
INNER JOIN tblComputerSystem ON tblComputerSystem.AssetID = tblAssets.AssetID
...
WHERE
tblassetcustom.State = 1
AND tblComputerSystem.DomainRole > 1
FROMand add tblDomainRoles.DomainRoleName to your report.
...
INNER JOIN tblDomainRoles ON tblDomainRoles.DomainRole = tblComputerSystem.DomainRole
‎07-16-2021 11:39 AM
‎07-15-2021 05:24 PM
Select Top 1000000
tblassets.AssetID,
tblassets.AssetName,
tsysassettypes.AssetTypename,
tsysassettypes.AssetTypeIcon10 As icon,
tblSqlServers.displayVersion As [SQL Server version],
tblSqlServers.skuName As [SQL SKU name],
tblSqlServers.fileVersion As [SQL file version],
s1.SoftwarePublisher AS [soft1 Publisher],
s1.SoftwareName AS [soft1 Name],
s1.SoftwareVersion AS [soft1 Version],
s2.SoftwarePublisher AS [soft2 Publisher],
s2.SoftwareName AS [soft2 Name],
s2.SoftwareVersion AS [soft2 Version],
tblassets.Lastseen,
tblassets.Lasttried
From
tblassets
Inner Join tblassetcustom On tblassets.AssetID = tblassetcustom.AssetID
Inner Join tsysassettypes On tsysassettypes.AssetType = tblassets.Assettype
Inner Join tblSqlServers On tblSqlServers.AssetID = tblAssets.AssetID
Left Join (SELECT
tblSoftware.AssetID,
tblSoftwareUni.SoftwarePublisher,
tblSoftwareUni.SoftwareName,
tblSoftware.SoftwareVersion
FROM tblSoftware
Inner Join tblSoftwareUni ON tblSoftwareUni.SoftID = tblSoftware.SoftID
WHERE
tblSoftwareUni.SoftwareName LIKE '%software name 1%'
) AS s1 ON s1.AssetID = tblAssets.AssetID
Left Join (SELECT
tblSoftware.AssetID,
tblSoftwareUni.SoftwarePublisher,
tblSoftwareUni.SoftwareName,
tblSoftware.SoftwareVersion
FROM tblSoftware
Inner Join tblSoftwareUni ON tblSoftwareUni.SoftID = tblSoftware.SoftID
WHERE
tblSoftwareUni.SoftwareName LIKE '%software name 2%'
) AS s2 ON s2.AssetID = tblAssets.AssetID
Where
tblassetcustom.State = 1
Order by
tblAssets.AssetName,
tblSqlServers.displayVersion,
tblSqlServers.skuName
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now