Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tblAssets.IPAddress,
tblAssetCustom.Manufacturer,
tblVmwareProductInfo.Vendor,
tblVmwareProductInfo.OsType,
tblVmwareProductInfo.Version,
tblVmwareProductInfo.Build,
Case
When tblVmwareProductInfo.Version = '6.0.0' And
Cast(tblVmwareProductInfo.Build As bigint) > 13638623 Then '#d4f4be'
When tblVmwareProductInfo.Version = '6.5.0' And
Cast(tblVmwareProductInfo.Build As bigint) > 13834586 Then '#d4f4be'
When tblVmwareProductInfo.Version = '6.7.0' And
Cast(tblVmwareProductInfo.Build As bigint) > 13843380 Then '#d4f4be'
Else '#ffadad'
End As backgroundcolor,
Case
When tblVmwareProductInfo.Version = '6.0.0' And
Cast(tblVmwareProductInfo.Build As bigint) > 13638623 Then 'Up to date'
When tblVmwareProductInfo.Version = '6.5.0' And
Cast(tblVmwareProductInfo.Build As bigint) > 13834586 Then 'Up to date'
When tblVmwareProductInfo.Version = '6.7.0' And
Cast(tblVmwareProductInfo.Build As bigint) > 13843380 Then 'Up to date'
Else 'Out of date'
End As [Patch Status],
tblAssets.Lastseen,
tblAssets.Lasttried
From tblVmwareVcenters
Inner Join tblAssets On tblAssets.AssetID = tblVmwareVcenters.AssetID
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
Where tblVmwareProductInfo.OsType Like '%linux%' And tblState.Statename =
'Active'
Order By tblAssets.IPAddress,
tblAssets.AssetName
Explore the full platform, free for 14 days.
No credit card required.