‎06-16-2016 04:31 AM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Description,
tsysOS.OSname,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblADComputers.OU,
tblSoftwareUni.softwareName
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Left Join tblSoftware On tblAssets.AssetID = tblSoftware.AssetID
Left Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
Where (tblSoftwareUni.softwareName Like 'Microsoft Office%' And
tblSoftwareUni.softwareName Not Like '%viewer%' And
tblSoftwareUni.softwareName Not Like '%proofing%' And
tblSoftwareUni.softwareName Not Like '%visio%' And
SubString(tblSoftwareUni.softwareName, Len(tblSoftwareUni.softwareName) - 4,
3) = ' 20') Or
(tblAssets.AssetID Not In (Select Top 1000000 tblSoftware.AssetID
From tblSoftware Inner Join tblSoftwareUni On tblSoftwareUni.SoftID =
tblSoftware.softID
Where tblSoftwareUni.softwareName Like '%Microsoft Office%') And
tblAssets.IPAddress Like '131.217.36.%')
Order By tblAssets.IPAddress
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now