Thanks! That looks sweet!
However, I discovered that the query I requested doesn't provide me the correct result. What I'm really after is a query that gives me an overview off all alerts with status new, created today with corresponding managed devices. From another forum I got another query which I 've rebuilt a little and I'd like to extend with today's date.
SELECT TOP (100) PERCENT vAlert.DBCreatedDateTime, vAlert.RaisedDateTime, vEntity.DisplayName, vAlert.AlertName, vAlert.AlertDescription,
Alert.vAlertResolutionState.AlertGuid, Alert.vAlertResolutionState.ResolutionState
FROM Alert.vAlert AS vAlert INNER JOIN
dbo.vManagedEntity AS vEntity ON vAlert.ManagedEntityRowId = vEntity.ManagedEntityRowId INNER JOIN
Alert.vAlertResolutionState ON vAlert.AlertGuid = Alert.vAlertResolutionState.AlertGuid
WHERE (Alert.vAlertResolutionState.ResolutionState = 0)
ORDER BY vAlert.RaisedDateTime DESC
I would like to extend this one with today's all new alerts.
So I add something like
AND RaisedDateTime = GetDate()
But this produces a blank result.
Is there, probably very simple, a way to achieve this?