→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
‎04-04-2018 05:47 PM
Select Distinct Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.IPAddress,
tblNtlogSource.Sourcename,
Max(tblNtlog.TimeGenerated) As LastOccurrence,
tblADusers.Displayname,
tblAssets.OScode,
tblNtlogMessage.Message,
tblNtlog.Eventcode
From tblAssets
Inner Join tblNtlog On tblAssets.AssetID = tblNtlog.AssetID
Inner Join tblNtlogSource On tblNtlogSource.SourcenameID =
tblNtlog.SourcenameID
Inner Join tblNtlogMessage On tblNtlogMessage.MessageID = tblNtlog.MessageID
Left Join tblADusers On tblADusers.Username = tblAssets.Username And
tblADusers.Userdomain = tblAssets.Userdomain
Group By tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.IPAddress,
tblNtlogSource.Sourcename,
tblADusers.Displayname,
tblAssets.OScode,
tblNtlogMessage.Message,
tblNtlog.Eventcode
Having tblNtlog.Eventcode In (12294)
Order By LastOccurrence Desc
‎04-26-2018 03:25 PM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now