‎02-05-2016 06:19 PM
Solved! Go to Solution.
‎02-07-2016 12:30 PM
‎02-08-2016 03:26 PM
‎02-07-2016 12:30 PM
‎02-05-2016 10:28 PM
SELECT Top 1000000
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblSoftwareUni.softwareName
FROM
tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblSoftware On tblAssets.AssetID = tblSoftware.AssetID
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
WHERE
tblAssetCustom.State = 1
AND tblSoftwareUni.softwareName LIKE 'Microsoft SQL Server%'
AND ( tblSoftwareUni.softwareName LIKE '%2000%'
OR tblSoftwareUni.softwareName LIKE '%2005%'
OR tblSoftwareUni.softwareName LIKE '%Compact%'
)
AND tblSoftwareUni.softwareName NOT LIKE '%Backward compatibility'
AND tblSoftwareUni.softwareName NOT LIKE '%Books Online%'
AND tblSoftwareUni.softwareName NOT LIKE '%Query Tools%'
ORDER BY
tblSoftwareUni.softwareName,
tblAssets.AssetName
WHERE
tblAssetCustom.State = 1
AND tblSoftwareUni.softwareName LIKE 'Microsoft SQL Server%'
AND tblSoftwareUni.softwareName NOT LIKE '%App Framework'
AND tblSoftwareUni.softwareName NOT LIKE '%Backward compatibility'
AND tblSoftwareUni.softwareName NOT LIKE '%Books Online%'
AND tblSoftwareUni.softwareName NOT LIKE '%Command Line Utilities'
AND tblSoftwareUni.softwareName NOT LIKE '%Compiler Service'
AND tblSoftwareUni.softwareName NOT LIKE '%Data Tools%'
AND tblSoftwareUni.softwareName NOT LIKE '%Language Service'
AND tblSoftwareUni.softwareName NOT LIKE '%Management Objects%'
AND tblSoftwareUni.softwareName NOT LIKE '%Management Studio%'
AND tblSoftwareUni.softwareName NOT LIKE '%Native Client'
AND tblSoftwareUni.softwareName NOT LIKE '%Policies'
AND tblSoftwareUni.softwareName NOT LIKE '%Query Tools%'
AND tblSoftwareUni.softwareName NOT LIKE '%Report Builder%'
AND tblSoftwareUni.softwareName NOT LIKE '%ScriptDom'
AND tblSoftwareUni.softwareName NOT LIKE '%Server Browser'
AND tblSoftwareUni.softwareName NOT LIKE '%Setup%'
AND tblSoftwareUni.softwareName NOT LIKE '%Support Files'
AND tblSoftwareUni.softwareName NOT LIKE '%System CLR Types%'
AND tblSoftwareUni.softwareName NOT LIKE '%Upgrade Advisor'
AND tblSoftwareUni.softwareName NOT LIKE '%VSS Writer'
AND tblSoftwareUni.softwareName NOT LIKE 'Hotfix%'
AND tblSoftwareUni.softwareName NOT LIKE '%2008%'
AND tblSoftwareUni.softwareName NOT LIKE '%2012%'
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now