‎01-28-2019 02:35 PM
‎01-30-2019 06:23 PM
Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tsysIPLocations.IPLocation As [Office Location],
tblAssets.Username As [Last Logon User],
tblSoftwareUni.softwareName,
tblSoftware.softwareVersion,
tsysOS.OSname As [Operating System],
tblAssets.Lastseen
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Left Outer Join tsysIPLocations On tblAssets.IPNumeric >=
tsysIPLocations.StartIP And tblAssets.IPNumeric <= tsysIPLocations.EndIP
Inner Join tblSoftware On tblAssets.AssetID = tblSoftware.AssetID
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
Inner Join (Select Top 1000000 tblAssets.AssetID,
Count(tblSoftwareUni.SoftID) As OfficeCount
From tblAssets
Inner Join tblSoftware On tblAssets.AssetID = tblSoftware.AssetID
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
Where (tblSoftwareUni.softwareName Like '%Office%2007%' Or )
tblSoftwareUni.softwareName Like '%Office%2010%'
Group By tblAssets.AssetID
Having Count(tblSoftwareUni.SoftID) > 1 ) SubQuery1 On SubQuery1.AssetID =
tblAssets.AssetIDWhere (tblSoftwareUni.softwareName Like '%Office%2007%' Or
tblSoftwareUni.softwareName Like '%Office%2010%')
Order By [Office Location],
tblAssets.AssetName,
tblAssets.Lastseen Desc
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now