Select Top 1000000 tblAssets.AssetID, Coalesce(tsysOS.Image, tsysAssetTypes.AssetTypeIcon10) As icon, tblAssets.AssetName, tblAssets.IPAddress, tblAssetCustom.Manufacturer, tblVmwareProductInfo.Vendor, tblVmwareProductInfo.OsType, tblVmwareProductInfo.Version, tblVmwareProductInfo.Build, Case When tblVmwareProductInfo.Version Like '6.5%' And Convert(bigint,tblVmwareProductInfo.Build) >= 18499837 Then 'Safe' When tblVmwareProductInfo.Version Like '6.7%' And Convert(bigint,tblVmwareProductInfo.Build) >= 18485166 Then 'Safe' When tblVmwareProductInfo.Version Like '7.0%' And Convert(bigint,tblVmwareProductInfo.Build) >= 18455184 Then 'Safe' Else 'Vulnerable' End As [Safe/Vulnerable], Case When tblErrors.ErrorText Is Not Null Or tblErrors.ErrorText != '' Then 'Scanning Error: ' + tsysasseterrortypes.ErrorMsg Else '' End As ScanningErrors, tblAssets.Lastseen, tblAssets.Lasttried, Case When tblVmwareProductInfo.Version Like '6.5%' And Convert(bigint,tblVmwareProductInfo.Build) >= 18499837 Then '#d4f4be' When tblVmwareProductInfo.Version Like '6.7%' And Convert(bigint,tblVmwareProductInfo.Build) >= 18485166 Then '#d4f4be' When tblVmwareProductInfo.Version Like '7.0%' And Convert(bigint,tblVmwareProductInfo.Build) >= 18455184 Then '#d4f4be' Else '#ffadad' End As backgroundcolor From tblVmwareVcenters Inner Join tblAssets On tblAssets.AssetID = tblVmwareVcenters.AssetID Left Join tsysOS On tsysOS.OScode = tblAssets.OScode Inner Join tblVmwareProductInfo On tblVmwareVcenters.VcenterID = tblVmwareProductInfo.VCenterID Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID Inner Join tblState On tblState.State = tblAssetCustom.State Left Join (Select Distinct Top 1000000 tblErrors.AssetID As ID, Max(tblErrors.Teller) As ErrorID From tblErrors Group By tblErrors.AssetID) As ScanningError On tblAssets.AssetID = ScanningError.ID Left Join tblErrors On ScanningError.ErrorID = tblErrors.Teller Left Join tsysasseterrortypes On tsysasseterrortypes.Errortype = tblErrors.ErrorType Where (tblVmwareProductInfo.Version Like '6.5%' And tblState.Statename = 'Active') Or (tblVmwareProductInfo.Version Like '6.7%') Or (tblVmwareProductInfo.Version Like '7.0%') Order By tblAssets.IPAddress, tblAssets.AssetName
Explore the full platform, free for 14 days.
No credit card required.