‎03-12-2015 08:01 AM
Solved! Go to Solution.
‎03-12-2015 02:13 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tUptime.[Last power on time],
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.Lastseen As [Last scan],
Ceiling(tblAssets.Uptime /
3600) As [uptime since boot up during last scan (h)],
tblAssets.Username As [Last user logged on]
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Left Join (Select tblUptime.AssetId,
Max(tblUptime.EventTime) As [Last power on time]
From tblUptime
Where tblUptime.EventType In (1, 4)
Group By tblUptime.AssetId) tUptime On tUptime.AssetId = tblAssets.AssetID
Where tblAssetCustom.State = 1 And tblAssets.Assettype = -1
Order By tblAssets.AssetName
‎03-12-2015 02:13 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tUptime.[Last power on time],
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.Lastseen As [Last scan],
Ceiling(tblAssets.Uptime /
3600) As [uptime since boot up during last scan (h)],
tblAssets.Username As [Last user logged on]
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Left Join (Select tblUptime.AssetId,
Max(tblUptime.EventTime) As [Last power on time]
From tblUptime
Where tblUptime.EventType In (1, 4)
Group By tblUptime.AssetId) tUptime On tUptime.AssetId = tblAssets.AssetID
Where tblAssetCustom.State = 1 And tblAssets.Assettype = -1
Order By tblAssets.AssetName
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now