
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2014 10:10 PM
Hello Forum!!
I wonder if anyone could help me - pretty basic query but a lot of stuff I want to exclude;
basically I am just looking for a report that shows me "cumputers by uptime" wanna see who is leaving their computers on-
I think there is a value somewhere like "lastboot" but- I suck-
Can someone help with a query that lists PC by last boot time, or, uptime if it exists- and if possible- Just PC's- IE no monitors-network gear- or servers?
thanks as always guys-
I wonder if anyone could help me - pretty basic query but a lot of stuff I want to exclude;
basically I am just looking for a report that shows me "cumputers by uptime" wanna see who is leaving their computers on-
I think there is a value somewhere like "lastboot" but- I suck-
Can someone help with a query that lists PC by last boot time, or, uptime if it exists- and if possible- Just PC's- IE no monitors-network gear- or servers?
thanks as always guys-
Solved! Go to Solution.
Labels:
- Labels:
-
Report Center
1 ACCEPTED SOLUTION

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2014 12:53 PM
Please use the following report, to see how long an asset has been on.
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
Convert(nvarchar(10),Ceiling(Floor(Convert(integer,tblAssets.Uptime) / 3600 /
24))) + ':' +
Convert(nvarchar(10),Ceiling(Floor(Convert(integer,tblAssets.Uptime) / 3600 %
24))) + ':' +
Convert(nvarchar(10),Ceiling(Floor(Convert(integer,tblAssets.Uptime) % 3600 /
60))) As [uptime day:hour:minutes]
From tblAssets
Order By tblAssets.AssetName
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
Convert(nvarchar(10),Ceiling(Floor(Convert(integer,tblAssets.Uptime) / 3600 /
24))) + ':' +
Convert(nvarchar(10),Ceiling(Floor(Convert(integer,tblAssets.Uptime) / 3600 %
24))) + ':' +
Convert(nvarchar(10),Ceiling(Floor(Convert(integer,tblAssets.Uptime) % 3600 /
60))) As [uptime day:hour:minutes]
From tblAssets
Order By tblAssets.AssetName
3 REPLIES 3

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2014 12:53 PM
Please use the following report, to see how long an asset has been on.
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
Convert(nvarchar(10),Ceiling(Floor(Convert(integer,tblAssets.Uptime) / 3600 /
24))) + ':' +
Convert(nvarchar(10),Ceiling(Floor(Convert(integer,tblAssets.Uptime) / 3600 %
24))) + ':' +
Convert(nvarchar(10),Ceiling(Floor(Convert(integer,tblAssets.Uptime) % 3600 /
60))) As [uptime day:hour:minutes]
From tblAssets
Order By tblAssets.AssetName
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
Convert(nvarchar(10),Ceiling(Floor(Convert(integer,tblAssets.Uptime) / 3600 /
24))) + ':' +
Convert(nvarchar(10),Ceiling(Floor(Convert(integer,tblAssets.Uptime) / 3600 %
24))) + ':' +
Convert(nvarchar(10),Ceiling(Floor(Convert(integer,tblAssets.Uptime) % 3600 /
60))) As [uptime day:hour:minutes]
From tblAssets
Order By tblAssets.AssetName

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-06-2014 10:43 PM
Helpful and thanks - but it does look like this just gives me a report of all asssets that are currently "on"
is it possible to filter this to just PC's- and show how LONG they have been on using lastboot or uptime?
is it possible to filter this to just PC's- and show how LONG they have been on using lastboot or uptime?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2014 04:05 PM
Please use the following query to see which computers are online at the moment that you are running the report.
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName
From tblAssets
Where (Select Top 1 tblUptime.EventType From tblUptime
Where tblUptime.AssetId = tblAssets.AssetID Order By tblUptime.EventTime) = 1
To use the report above, do the following:
• Open the report builder under Reports/Create New Report.
• Paste the SQL code we provided at the bottom of the page.
• Left-click somewhere in the upper section of the page so the code applies.
• Give the report a Title and hit the Save & Run button to save it. Export options are listed on the left.
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName
From tblAssets
Where (Select Top 1 tblUptime.EventType From tblUptime
Where tblUptime.AssetId = tblAssets.AssetID Order By tblUptime.EventTime) = 1
To use the report above, do the following:
• Open the report builder under Reports/Create New Report.
• Paste the SQL code we provided at the bottom of the page.
• Left-click somewhere in the upper section of the page so the code applies.
• Give the report a Title and hit the Save & Run button to save it. Export options are listed on the left.
