‎12-08-2018 12:54 AM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tsysIPLocations.IPLocation,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblVmwareGuest.Name,
tblVmwareGuest.ToolsVersion,
Case tblVmwareGuest.ToolsVersionStatus
When '1' Then 'Current'
When '2' Then 'Out of date'
When '3' Then 'Not installed'
When '4' Then 'Unmanaged'
End As ToolsVersionStatus,
Case tblVmwareGuest.ToolsRunningStatus
When '1' Then 'Executing scripts'
When '2' Then 'Not running'
When '3' Then 'Running'
End As ToolsRunningStatus
From tblAssetCustom
Inner Join (tblVmwareGuest
Inner Join tblAssets On tblVmwareGuest.AssetID = tblAssets.AssetID) On
tblAssetCustom.AssetID = tblAssets.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tsysIPLocations On tsysIPLocations.LocationID =
tblAssets.LocationID
Inner Join tblState On tblState.State = tblAssetCustom.State
Inner Join tblVmwareInfo On tblVmwareInfo.AssetID = tblAssets.AssetID
Where tblState.Statename = 'Active'
Order By tblAssets.IPNumeric,
tblAssets.AssetName,
tblVmwareGuest.Name
‎12-17-2018 08:19 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tsysIPLocations.IPLocation,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblVmwareGuest.Name,
tblVmwareGuest.ToolsVersion,
Case tblVmwareGuest.ToolsVersionStatus
When '1' Then 'Current'
When '2' Then 'Out of date'
When '3' Then 'Not installed'
When '4' Then 'Unmanaged'
End As ToolsVersionStatus,
Case tblVmwareGuest.ToolsRunningStatus
When '1' Then 'Executing scripts'
When '2' Then 'Not running'
When '3' Then 'Running'
End As ToolsRunningStatus
From tsysAssetTypes
Right Outer Join (tblVmwareGuest
Inner Join tblAssets On tblVmwareGuest.AssetID = tblAssets.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblState On tblState.State = tblAssetCustom.State) On
tsysAssetTypes.AssetType = tblAssets.Assettype
Left Join tsysIPLocations On tblAssets.LocationID = tsysIPLocations.LocationID
Where tblState.Statename = 'Active'
Order By tblAssets.IPNumeric,
tblAssets.AssetName,
tblVmwareGuest.Name
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now