cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
INNO-IT
Engaged Sweeper II
Hi lansweeper community,

I've a little report problem I hope you can help me with.

I want to create a report to get the uptime stats for some assets.
For this I've created a report to get the eventtype changes together with the eventtime.

The actual report is the following:
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblUptime.EventTime,
tblUptime.EventType,
Case tblUptime.EventType
When 1 Then 'power on'
When 2 Then 'power off'
When 3 Then 'Start sleep'
When 4 Then 'End sleep'
When 5 Then 'Unexpected shutdown'
End As Event
From tblAssets
Inner Join tblUptime On tblAssets.AssetID = tblUptime.AssetId
Where tblUptime.EventTime > GetDate() - 7
Order By tblUptime.EventTime Desc


The results seems at first fine, but it provides a lot of "duplicates" of the eventtype with a little difference in the eventtime (a few seconds) like this:


Do you have an idea where the double eventtypes comes from and how to avoid these?

Thank you very much.
0 REPLIES 0