
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2021 05:17 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Username,
tblAssetCustom.Custom2,
tblAssetCustom.Custom3,
tblAssets.IPAddress,
tblAssets.Firstseen,
tblAssets.Lastseen,
tsysOS.Image As icon,
Case tblMonitorHist.Action
When 1 Then '+'
When 2 Then '-'
End As Change,
tblMonitorHist.MonitorManufacturer,
tblMonitorHist.MonitorModel,
tblMonitorHist.SerialNumber,
tblMonitorHist.LastChanged As [Last monitor change]
From tblAssets
Inner Join tblMonitorHist On tblAssets.AssetID = tblMonitorHist.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Where (tblAssets.IPAddress Like '10.15.%' Or tblAssets.IPAddress Like '10.95.%')
And tblMonitorHist.LastChanged >= Cast('03-15-2020' As DATETIME) And
tblAssetCustom.State = 1
Order By tblAssets.AssetName,
[Dernière changement Écran] Desc
- Labels:
-
Report Center

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2024 02:20 PM
Still trying to get LS to add the IPlocation in the tblmonitorhist table so I can see where these monitors are physically based on IP.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2024 02:19 PM
Hi I created a new report and used these filters ( MAX ).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2021 07:06 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2024 02:39 PM
My next step is to get the IP location recorded with each entry so I know where the device is physically. Its not currently part of the table. If I use the assets table the location is the last location of the user on record which is not what I need.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2021 06:59 PM
Select Top 1000000
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Username,
tblAssetCustom.Custom2,
tblAssetCustom.Custom3,
tblAssets.IPAddress,
tblAssets.Firstseen,
tblAssets.Lastseen,
tsysOS.Image As icon,
MaxMonitorHist.MonitorManufacturer,
MaxMonitorHist.MonitorModel,
MaxMonitorHist.SerialNumber,
MaxMonitorHist.LastAdded
From
tblAssets
INNER JOIN (SELECT
tblMonitorHist.AssetID,
tblMonitorHist.MonitorManufacturer,
tblMonitorHist.MonitorModel,
tblMonitorHist.SerialNumber,
Max(tblMonitorHist.LastChanged) AS LastAdded
FROM
tblMonitorHist
WHERE
tblMonitorHist.Action = 1 -- added
AND tblMonitorHist.LastChanged >= Cast('03-15-2020' As DATETIME)
GROUP BY
tblMonitorHist.AssetID,
tblMonitorHist.MonitorManufacturer,
tblMonitorHist.MonitorModel,
tblMonitorHist.SerialNumber ) AS MaxMonitorHist ON MaxMonitorHist.AssetID = tblAssets.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Where
tblAssetCustom.State = 1
And (tblAssets.IPAddress Like '10.15.%' Or tblAssets.IPAddress Like '10.95.%')
Order By
tblAssets.AssetName
The inner SELECT is pulling a list of the last time any given monitor was connected to an asset on or after 2020-03-15. I believe I got the logic right, but always double-check.

