‎08-18-2016 03:23 PM
Select Top (50) Count(tblAssets.AssetName) As BadBlocks,
tblAssets.AssetName,
tblAssets.Username
From tblNtlogMessage
Inner Join tblNtlog On tblNtlogMessage.MessageID = tblNtlog.MessageID
Inner Join tblAssets On tblAssets.AssetID = tblNtlog.AssetID
Where tblNtlogMessage.Message Like '%has a bad block%'
Group By tblAssets.AssetName,
tblAssets.Username
Order By BadBlocks Desc
Solved! Go to Solution.
‎08-18-2016 06:23 PM
Select Top 100000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Username,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
T1.BadBlocks,
T1.LastBadBlockReported
From tblAssets
Inner Join tblAssetCustom On tblAssetCustom.AssetID = tblAssets.AssetID
Inner Join (Select tblNtlog.AssetID,
Count(tblNtlog.AssetID) As BadBlocks,
Max(tblNtlog.TimeGenerated) As LastBadBlockReported
From tblNtlog
Inner Join tblNtlogMessage On tblNtlogMessage.MessageID = tblNtlog.MessageID
Where tblNtlogMessage.Message Like '%has a bad block%'
Group By tblNtlog.AssetID) T1 On T1.AssetID = tblAssets.AssetID
Where tblAssetCustom.State = 1
Order By T1.BadBlocks Desc,
T1.LastBadBlockReported Desc
‎08-19-2016 10:34 AM
‎08-18-2016 06:23 PM
Select Top 100000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Username,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
T1.BadBlocks,
T1.LastBadBlockReported
From tblAssets
Inner Join tblAssetCustom On tblAssetCustom.AssetID = tblAssets.AssetID
Inner Join (Select tblNtlog.AssetID,
Count(tblNtlog.AssetID) As BadBlocks,
Max(tblNtlog.TimeGenerated) As LastBadBlockReported
From tblNtlog
Inner Join tblNtlogMessage On tblNtlogMessage.MessageID = tblNtlog.MessageID
Where tblNtlogMessage.Message Like '%has a bad block%'
Group By tblNtlog.AssetID) T1 On T1.AssetID = tblAssets.AssetID
Where tblAssetCustom.State = 1
Order By T1.BadBlocks Desc,
T1.LastBadBlockReported Desc
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now