‎03-20-2015 11:17 PM
Solved! Go to Solution.
‎03-23-2015 11:17 AM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblUptime.EventTime As [event time],
Case tblUptime.EventType When 1 Then 'power on' When 2 Then 'power off'
Else 'unknown' End As [event type]
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Left Join tblUptime On tblAssets.AssetID = tblUptime.AssetId
Where tblUptime.EventTime > GetDate() - 3 And tblAssetCustom.State = 1
And tblUptime.EventType In (1, 2)
Order By tblAssets.AssetName
‎03-23-2015 10:22 PM
‎03-23-2015 11:17 AM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblUptime.EventTime As [event time],
Case tblUptime.EventType When 1 Then 'power on' When 2 Then 'power off'
Else 'unknown' End As [event type]
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Left Join tblUptime On tblAssets.AssetID = tblUptime.AssetId
Where tblUptime.EventTime > GetDate() - 3 And tblAssetCustom.State = 1
And tblUptime.EventType In (1, 2)
Order By tblAssets.AssetName
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now